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

Key to entities used below:   - Non-breaking space. א ... ו - The first six Hebrew letters (strongly RTL). ‭ - The LRO (left-to-right override) formatting character. ‬ - The PDF (pop directional formatting) formatting character; closes LRO. In the test below, the non-breaking spaces in the BDI's middle "word" make it so long that it must be displayed on a line of its own, with the BDI wrapped before and after it. At the same time, the content surrounding the BDI is supposed to form a single directional run, despite the containing element and the BDI both having the opposite direction, because the BDI must be treated as a neutral. Thus, on the line containing the first part of the BDI, the BDI's content must appear after the content preceding it, and on the line containing the last part of the BDI, the BDI content must appear before the content following it, where both 'before' and 'after' are defined relative to the surrounding directional run.
א > b >>>                                                  c > ד...
a > ב >>>                                                  ג > d...
‭b < א‬
‭>>>‬
‭ד < c...‬
‭a > ב‬
‭<<<‬
‭...ג > d‬