Test passes if the two boxes below look exactly the same.

Key to entities used below: א ... ו - The first six Hebrew letters (strongly RTL). ‭ - The LRO (left-to-right override) formatting character. ‬ - The PDF (pop directional formatting) formatting character; closes LRO.
‭1 + [a + [3 + [b + 4] + ב] + 2] + א‬
‭1 + [a + [3 + [b + 4] + ב] + 2] + א‬
‭1 + [a + [3 + [b + 4] + ב] + 2] + א‬
‭a + [1 + [b + [3 + ב] + 2] + א] + 0‬
‭a + [1 + [b + [3 + ב] + 2] + א] + 0‬
‭a + [1 + [b + [3 + ב] + 2] + א] + 0‬
‭1 + [a + [3 + [b + 4] + ב] + 2] + א‬
‭1 + [a + [3 + [b + 4] + ב] + 2] + א‬
‭1 + [a + [3 + [b + 4] + ב] + 2] + א‬
‭a + [1 + [b + [3 + ב] + 2] + א] + 0‬
‭a + [1 + [b + [3 + ב] + 2] + א] + 0‬
‭a + [1 + [b + [3 + ב] + 2] + א] + 0‬