| 1 | # Test related to issue #500: Deprecate the use of = (equals) as a dots operand in opcodes or fix documentation |
| 2 | # (https://github.com/liblouis/liblouis/issues/500) |
| 3 | |
| 4 | # The reason the `=` operand works most of the time is the fact that |
| 5 | # most of the time, a given dot pattern will back-translate to its |
| 6 | # original characters if no rules tell the back-translator otherwise. |
| 7 | |
| 8 | # It will not work when the "=" rule exists to circumvent another rule |
| 9 | # that would also affect back-translation, e.g. if a table contains |
| 10 | # the following rules: |
| 11 | |
| 12 | # always ooo 135-135 |
| 13 | # word foobar = |
| 14 | |
| 15 | # The dot pattern 124-135-135-12-1-1235 will back-translate to fooobar |
| 16 | # as specified by the first rule. |
| 17 | |
| 18 | # Not a very practical example, I admit, but it demonstrates the |
| 19 | # problem. |
| 20 | |
| 21 | # I think the = operand is originally a good idea, because it is a |
| 22 | # clear way of saying that the string should be matched by the basic |
| 23 | # dot pattern. If it were to work also for back-translation, perhaps |
| 24 | # the = sign should be replaced internally by the corresponding dot |
| 25 | # pattern at compile time. |
| 26 | |
| 27 | display: tables/unicode.dis |
| 28 | table: | |
| 29 | punctuation ; 56 |
| 30 | include tables/latinLetterDef6Dots.uti |
| 31 | lowercase ó 56-135 |
| 32 | include tables/unicode-braille.utb |
| 33 | always ooo 135-135 |
| 34 | word foobar = |
| 35 | word fóóbar = |
| 36 | |
| 37 | tests: |
| 38 | - - foobar |
| 39 | - ⠋⠕⠕⠃⠁⠗ |
| 40 | - ["fóóbar", "⠋⠰⠕⠰⠕⠃⠁⠗"] |
| 41 | |
| 42 | flags: {testmode: backward} |
| 43 | tests: |
| 44 | - - ⠋⠕⠕⠃⠁⠗ |
| 45 | - foobar |
| 46 | - xfail: does not work and this is now mentioned in the documentation as a limitation |