Confirm that ZERO WIDTH JOINER will never start a word.
()
| 2 | import os |
| 3 | |
| 4 | def test_4716(): |
| 5 | """Confirm that ZERO WIDTH JOINER will never start a word.""" |
| 6 | script_dir = os.path.dirname(__file__) |
| 7 | filename = os.path.join(script_dir, "resources", "test_4716.pdf") |
| 8 | doc = pymupdf.open(filename) |
| 9 | expected = set(["+25.00", "Любимый", "-10.00"]) |
| 10 | word_text = set() |
| 11 | for page in doc: |
| 12 | words = page.get_text("words") |
| 13 | for w in words: |
| 14 | word_text.add(w[4]) |
| 15 | assert word_text == expected |