Debian Codegraph @

tests/yaml/numericmode.yaml

raw symbols SCIP
1 table: |
2 display , 6
3 display # 3456
4 display ; 56
5 display - 36
6 punctuation - 36
7 include tables/spaces.uti
8 include tables/latinLetterDef6Dots.uti
9 include tables/digits6Dots.uti
10 include tables/litdigits6Dots.uti
11 include tables/braille-patterns.cti
12 capsletter 6
13 numsign 3456
14 nocontractsign 56
15 nonumsign 56
16 numericnocontchars abcdefghij
17 numericmodechars -
18
19 flags: {testmode: bothDirections}
20 tests:
21 # characters in numericnocontchars require nocontractsign to cancel numeric mode
22 - - "123abc"
23 - "#abc;abc"
24 # "k" is not in numericnocontchars so does not require contractsign to cancel numeric mode
25 # see https://github.com/liblouis/liblouis/issues/400
26 - - "123kabc"
27 - "#abckabc"
28 # whitespace cancels numeric mode
29 - - "123 abc"
30 - "#abc abc"
31 # capsletter cancels numeric mode
32 - - "123Abc"
33 - "#abc,abc"
34 - - "123Kabc"
35 - "#abc,kabc"
36 # numericmodechars do not cancel numeric mode
37 - - "123-123"
38 - "#abc-abc"
39 - - "123-abc"
40 - "#abc-;abc"
41 - - "123-Abc"
42 - "#abc-,abc"
43
44 # nocontractsign/letsign should cancel numeric mode no matter what and should be ignored if not needed
45 flags: {testmode: backward}
46 tests:
47 - - "#abc,abck;abc"
48 - "123Abckabc"
49 - - "#abc,abc;abc"
50 - "123Abcabc"
51 - - "#abc,abc#;abc"
52 - "123Abcabc"
53 flags: {testmode: forward}
54 tests:
55 - - "123Abckabc"
56 - "#abc,abckabc"
57 - - "123Abcabc"
58 - "#abc,abcabc"
59
60 # numericmodechars vs. midendnumericmodechars
61 table: |
62 display , 6
63 display # 3456
64 display ; 56
65 display - 36
66 display . 46
67 punctuation , 6
68 punctuation - 36
69 punctuation . 46
70 include tables/spaces.uti
71 include tables/latinLetterDef6Dots.uti
72 include tables/digits6Dots.uti
73 include tables/litdigits6Dots.uti
74 include tables/braille-patterns.cti
75 capsletter 6
76 numsign 3456
77 nocontractsign 56
78 nonumsign 56
79 numericnocontchars abcdefghij
80 numericmodechars .
81 midendnumericmodechars -
82
83 flags: {testmode: bothDirections}
84 tests:
85 - - "-1 .1"
86 - "-#a #.a"
87 - - "123-456 123.456"
88 - "#abc-def #abc.def"
89 - - "-123-456-789 .123.456.789"
90 - "-#abc-def-ghi #.abc.def.ghi"
91 - - "-123-abc .123.abc"
92 - "-#abc-;abc #.abc.;abc"
93 - - "-123-Abc .123.Abc"
94 - "-#abc-,abc #.abc.,abc"
95 - - "abc-123 abc.123"
96 - "abc-#abc abc#.abc" # was this really intended?
97
98 flags: {testmode: backward}
99 tests:
100 # should work even if . is before #
101 - - ".#a"
102 - ".1"
103 - - "abc.#abc"
104 - "abc.123"
105
106 # Regression test for issue #401: If same dots are defined as endcapsword and nocontractsign, they don't work as nocontractsign
107 # (https://github.com/liblouis/liblouis/issues/401)
108 # The issue was fixed by https://github.com/liblouis/liblouis/pull/611.
109 table: |
110 display | 456
111 display ; 56
112 display # 3456
113 include tables/latinLetterDef6Dots.uti
114 include tables/digits6Dots.uti
115 include tables/litdigits6Dots.uti
116 include tables/braille-patterns.cti
117 numsign 3456
118 begcapsword 456
119 endcapsword 56 # endcapsword before nonumsign
120 nonumsign 56
121 numericnocontchars abcdefghij
122 table: |
123 display | 456
124 display ; 56
125 display # 3456
126 include tables/latinLetterDef6Dots.uti
127 include tables/digits6Dots.uti
128 include tables/litdigits6Dots.uti
129 include tables/braille-patterns.cti
130 numsign 3456
131 begcapsword 456
132 nonumsign 56 # nonumsign before endcapsword
133 endcapsword 56
134 numericnocontchars abcdefghij
135 flags: {testmode: backward}
136 tests:
137 # ";" must work as endcapsword
138 - - "|abc;abc"
139 - "ABCabc"
140 # ";" must also work as nonumsign and cancel number mode
141 - - "abc#abc;abc"
142 - "abc123abc"
143 - - "#abc;abc"
144 - "123abc"
145 # nonumsign is not necessary below, as "k" it not in numericmodechars
146 - - "#abckabc"
147 - "123kabc"
148 # it shouldn't cause issues though
149 - - "#abc;kabc"
150 - "123kabc"
151
152 # Numeric mode can also be implemented using the generic mode feature,
153 # but only for forward translation, and some things are not supported
154 # yet.
155 table: |
156 display # 3456
157 display , 6
158 display ; 56
159 display - 36
160 include tables/latinLetterDef6Dots.uti
161 base digit 1 a
162 base digit 2 b
163 base digit 3 c
164 base digit 4 d
165 base digit 5 e
166 base digit 6 f
167 base digit 7 g
168 base digit 8 h
169 base digit 9 i
170 base digit 0 j
171 capsletter 6
172 begmodeword digit 3456
173 endmodeword digit 56
174 include tables/spaces.uti
175 punctuation , 6
176 punctuation - 36
177 punctuation . 46
178 numericmodechars .
179 midendnumericmodechars -
180 flags: {testmode: forward}
181 tests:
182 - - "1"
183 - "#a"
184 - - "1a"
185 - "#a;a"
186 - - "1A"
187 - "#a,a"
188 - - "1t"
189 - "#at"
190 - - "a1"
191 - "a#a"
192 - - "t1"
193 - "t#a"
194 - - "1t1"
195 - "#at#a"
196 # repeat forward tests from above
197 tests:
198 - - "123abc"
199 - "#abc;abc"
200 - - "123kabc"
201 - "#abckabc"
202 - - "123 abc"
203 - "#abc abc"
204 - - "123Abc"
205 - "#abc,abc"
206 - - "123Kabc"
207 - "#abc,kabc"
208 - - "123-123"
209 - "#abc-abc"
210 - - "123-abc"
211 - "#abc-;abc"
212 - - "123-Abc"
213 - "#abc-,abc"
214 - - "123Abckabc"
215 - "#abc,abckabc"
216 - - "123Abcabc"
217 - "#abc,abcabc"
218 - - "-1 .1"
219 - "-#a #.a"
220 - xfail: number sign comes after "."
221 - - "123-456 123.456"
222 - "#abc-def #abc.def"
223 - - "-123-456-789 .123.456.789"
224 - "-#abc-def-ghi #.abc.def.ghi"
225 - xfail: number sign comes after "."
226 - - "-123-abc .123.abc"
227 - "-#abc-;abc #.abc.;abc"
228 - xfail: number sign comes after "."
229 - - "-123-Abc .123.Abc"
230 - "-#abc-,abc #.abc.,abc"
231 - xfail: number sign comes after "."
232 - - "abc-123 abc.123"
233 - "abc-#abc abc#.abc"
234 - xfail: number sign comes after "."
235