| table: | |
| display , 6 |
| display # 3456 |
| display ; 56 |
| display - 36 |
| punctuation - 36 |
| include tables/spaces.uti |
| include tables/latinLetterDef6Dots.uti |
| include tables/digits6Dots.uti |
| include tables/litdigits6Dots.uti |
| include tables/braille-patterns.cti |
| capsletter 6 |
| numsign 3456 |
| nocontractsign 56 |
| nonumsign 56 |
| numericnocontchars abcdefghij |
| numericmodechars - |
| |
| flags: {testmode: bothDirections} |
| tests: |
| # characters in numericnocontchars require nocontractsign to cancel numeric mode |
| - - "123abc" |
| - "#abc;abc" |
| # "k" is not in numericnocontchars so does not require contractsign to cancel numeric mode |
| # see https://github.com/liblouis/liblouis/issues/400 |
| - - "123kabc" |
| - "#abckabc" |
| # whitespace cancels numeric mode |
| - - "123 abc" |
| - "#abc abc" |
| # capsletter cancels numeric mode |
| - - "123Abc" |
| - "#abc,abc" |
| - - "123Kabc" |
| - "#abc,kabc" |
| # numericmodechars do not cancel numeric mode |
| - - "123-123" |
| - "#abc-abc" |
| - - "123-abc" |
| - "#abc-;abc" |
| - - "123-Abc" |
| - "#abc-,abc" |
| |
| # nocontractsign/letsign should cancel numeric mode no matter what and should be ignored if not needed |
| flags: {testmode: backward} |
| tests: |
| - - "#abc,abck;abc" |
| - "123Abckabc" |
| - - "#abc,abc;abc" |
| - "123Abcabc" |
| - - "#abc,abc#;abc" |
| - "123Abcabc" |
| flags: {testmode: forward} |
| tests: |
| - - "123Abckabc" |
| - "#abc,abckabc" |
| - - "123Abcabc" |
| - "#abc,abcabc" |
| |
| # numericmodechars vs. midendnumericmodechars |
| table: | |
| display , 6 |
| display # 3456 |
| display ; 56 |
| display - 36 |
| display . 46 |
| punctuation , 6 |
| punctuation - 36 |
| punctuation . 46 |
| include tables/spaces.uti |
| include tables/latinLetterDef6Dots.uti |
| include tables/digits6Dots.uti |
| include tables/litdigits6Dots.uti |
| include tables/braille-patterns.cti |
| capsletter 6 |
| numsign 3456 |
| nocontractsign 56 |
| nonumsign 56 |
| numericnocontchars abcdefghij |
| numericmodechars . |
| midendnumericmodechars - |
| |
| flags: {testmode: bothDirections} |
| tests: |
| - - "-1 .1" |
| - "-#a #.a" |
| - - "123-456 123.456" |
| - "#abc-def #abc.def" |
| - - "-123-456-789 .123.456.789" |
| - "-#abc-def-ghi #.abc.def.ghi" |
| - - "-123-abc .123.abc" |
| - "-#abc-;abc #.abc.;abc" |
| - - "-123-Abc .123.Abc" |
| - "-#abc-,abc #.abc.,abc" |
| - - "abc-123 abc.123" |
| - "abc-#abc abc#.abc" # was this really intended? |
| |
| flags: {testmode: backward} |
| tests: |
| # should work even if . is before # |
| - - ".#a" |
| - ".1" |
| - - "abc.#abc" |
| - "abc.123" |
| |
| # Regression test for issue #401: If same dots are defined as endcapsword and nocontractsign, they don't work as nocontractsign |
| # (https://github.com/liblouis/liblouis/issues/401) |
| # The issue was fixed by https://github.com/liblouis/liblouis/pull/611. |
| table: | |
| display | 456 |
| display ; 56 |
| display # 3456 |
| include tables/latinLetterDef6Dots.uti |
| include tables/digits6Dots.uti |
| include tables/litdigits6Dots.uti |
| include tables/braille-patterns.cti |
| numsign 3456 |
| begcapsword 456 |
| endcapsword 56 # endcapsword before nonumsign |
| nonumsign 56 |
| numericnocontchars abcdefghij |
| table: | |
| display | 456 |
| display ; 56 |
| display # 3456 |
| include tables/latinLetterDef6Dots.uti |
| include tables/digits6Dots.uti |
| include tables/litdigits6Dots.uti |
| include tables/braille-patterns.cti |
| numsign 3456 |
| begcapsword 456 |
| nonumsign 56 # nonumsign before endcapsword |
| endcapsword 56 |
| numericnocontchars abcdefghij |
| flags: {testmode: backward} |
| tests: |
| # ";" must work as endcapsword |
| - - "|abc;abc" |
| - "ABCabc" |
| # ";" must also work as nonumsign and cancel number mode |
| - - "abc#abc;abc" |
| - "abc123abc" |
| - - "#abc;abc" |
| - "123abc" |
| # nonumsign is not necessary below, as "k" it not in numericmodechars |
| - - "#abckabc" |
| - "123kabc" |
| # it shouldn't cause issues though |
| - - "#abc;kabc" |
| - "123kabc" |
| |
| # Numeric mode can also be implemented using the generic mode feature, |
| # but only for forward translation, and some things are not supported |
| # yet. |
| table: | |
| display # 3456 |
| display , 6 |
| display ; 56 |
| display - 36 |
| include tables/latinLetterDef6Dots.uti |
| base digit 1 a |
| base digit 2 b |
| base digit 3 c |
| base digit 4 d |
| base digit 5 e |
| base digit 6 f |
| base digit 7 g |
| base digit 8 h |
| base digit 9 i |
| base digit 0 j |
| capsletter 6 |
| begmodeword digit 3456 |
| endmodeword digit 56 |
| include tables/spaces.uti |
| punctuation , 6 |
| punctuation - 36 |
| punctuation . 46 |
| numericmodechars . |
| midendnumericmodechars - |
| flags: {testmode: forward} |
| tests: |
| - - "1" |
| - "#a" |
| - - "1a" |
| - "#a;a" |
| - - "1A" |
| - "#a,a" |
| - - "1t" |
| - "#at" |
| - - "a1" |
| - "a#a" |
| - - "t1" |
| - "t#a" |
| - - "1t1" |
| - "#at#a" |
| # repeat forward tests from above |
| tests: |
| - - "123abc" |
| - "#abc;abc" |
| - - "123kabc" |
| - "#abckabc" |
| - - "123 abc" |
| - "#abc abc" |
| - - "123Abc" |
| - "#abc,abc" |
| - - "123Kabc" |
| - "#abc,kabc" |
| - - "123-123" |
| - "#abc-abc" |
| - - "123-abc" |
| - "#abc-;abc" |
| - - "123-Abc" |
| - "#abc-,abc" |
| - - "123Abckabc" |
| - "#abc,abckabc" |
| - - "123Abcabc" |
| - "#abc,abcabc" |
| - - "-1 .1" |
| - "-#a #.a" |
| - xfail: number sign comes after "." |
| - - "123-456 123.456" |
| - "#abc-def #abc.def" |
| - - "-123-456-789 .123.456.789" |
| - "-#abc-def-ghi #.abc.def.ghi" |
| - xfail: number sign comes after "." |
| - - "-123-abc .123.abc" |
| - "-#abc-;abc #.abc.;abc" |
| - xfail: number sign comes after "." |
| - - "-123-Abc .123.Abc" |
| - "-#abc-,abc #.abc.,abc" |
| - xfail: number sign comes after "." |
| - - "abc-123 abc.123" |
| - "abc-#abc abc#.abc" |
| - xfail: number sign comes after "." |
| |