1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235
|
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 "."
|