Debian Codegraph @

tests/braille-specs/en-ueb-g2_backward.yaml

raw symbols SCIP
1 display: unicode-without-blank.dis
2 table:
3 language: en
4 grade: 2
5 system: ueb
6 __assert-match: en-ueb-g2.ctb
7 flags: {testmode: bothDirections}
8 tests:
9 # Patterns used for both punctuation and contractions.
10 - ["a!", ⠁⠖]
11 - [affa, ⠁⠖⠁]
12 - [his, ⠦]
13 - ["a?", ⠁⠦]
14 - ['"a', ⠦⠁]
15 - [was, ⠴]
16 - ['a"', ⠁⠴]
17 - ['"a"', ⠦⠁⠴]
18 - [were, ⠶]
19 - [agga, ⠁⠶⠁]
20 - [be, ⠆]
21 # Correct: "bea" does not forward translate to "⠆⠁" (received: "⠃⠑⠁")
22 flags: {testmode: backward}
23 tests:
24 - [⠆⠁, bea]
25 flags: {testmode: bothDirections}
26 tests:
27 - [abba, ⠁⠆⠁]
28 - [a;, ⠁⠆]
29 - [":", ⠒]
30 - [cona, ⠒⠁]
31 - ["a:", ⠁⠒]
32 - [acca, ⠁⠒⠁]
33 # Contractions prefixed by an indicator which means nothing on its own.
34 # These indicators are tested by themselves with no following cell in en-ueb-g1.
35 - [word, ⠘⠺]
36 - [many, ⠸⠍]
37 - [name, ⠐⠝]
38 - [ation, ⠁⠰⠝]
39 # #311: The grade 1 symbol indicator.
40 - [b, ⠰⠃]
41 - [B, ⠰⠠⠃]
42 - [ab, ⠰⠁⠃]
43 - [Ab, ⠰⠠⠁⠃]
44 - [1a, ⠼⠁⠰⠁]
45 - [1A, ⠼⠁⠠⠁]
46 # the cancel sign (56) is not strictly needed before a cap sign, but it is allowed
47 flags: {testmode: backward}
48 tests:
49 - [⠼⠁⠰⠠⠁, 1A]
50 flags: {testmode: bothDirections}
51 tests:
52 # #309: Ensure correct back-translation to "this".
53 - [this, ⠹]
54
55 # #360: Contractions followed by punctuation
56 # 1-letter contractions
57 - ["but,", ⠃⠂]
58 - ["but.", ⠃⠲]
59 - ["can,", ⠉⠂]
60 - ["do,", ⠙⠂]
61 # multi-letter contractions
62 - ["about,", ⠁⠃⠂]
63 - ["about.", ⠁⠃⠲]
64 - ["above,", ⠁⠃⠧⠂]
65 - ["above;", ⠁⠃⠧⠆]
66 - ["above:", ⠁⠃⠧⠒]
67 - ["above.", ⠁⠃⠧⠲]
68 - ["above!", ⠁⠃⠧⠖]
69 - ["above?", ⠁⠃⠧⠦]
70 - ['above"', ⠁⠃⠧⠴]
71 - ['above."', ⠁⠃⠧⠲⠴]
72
73 # Make sure back-translation for words with "ea" after letters that
74 # have contractions associated, such as words like meat, head and
75 # others works properly.
76 # See https://github.com/liblouis/liblouis/pull/350
77 - ["meat", ⠍⠂⠞]
78 - ["head", ⠓⠂⠙]
79
80 # #364: Whole word contractions followed by other contractions.
81 # In this case, the whole word contraction should not apply.
82 - [alone, ⠁⠇⠐⠕]
83 - [bar, ⠃⠜]
84 - [ben, ⠃⠢]
85 - [Ben, ⠠⠃⠢]
86 - [dance, ⠙⠨⠑]
87 - [fence, ⠋⠰⠑]
88 - [her, ⠓⠻]
89 - [sand, ⠎⠯]
90 - [sin, ⠎⠔]
91 - [sing, ⠎⠬]
92 - [Sing, ⠠⠎⠬]
93 - [sof, ⠎⠷]
94 - [song, ⠎⠰⠛]
95 - [thing, ⠹⠬]
96
97 # Issue #562 - "⠟⠅" erroneously back-translating as "quick's"
98 - [quick, ⠟⠅]
99
100 # Issue #572: "⠋⠌" erroneously back-translating as "first's"
101 - [first, ⠋⠌]
102
103 # Issue #572: "⠭⠄⠎" erroneously back-translating as "x's"
104 - ["it's", ⠭⠄⠎]
105 - ["x's", ⠰⠭⠄⠎]
106
107 # According to issue #434 ':)' should be translated as ⠒⠐⠜ (which
108 # works) and backtranslation should translate it back to ':)' (which
109 # doesn't work). See https://github.com/liblouis/liblouis/issues/434
110 # and https://github.com/nvaccess/nvda/issues/7678
111 - [":)", ⠒⠐⠜, xfail: {backward: true}]
112
113 # Issue #1018: contraction of "there"
114 - [there, ⠐⠮]
115 - [There, ⠠⠐⠮]
116 - [a.there, ⠁⠲⠐⠮]
117 - [bb.there, ⠃⠃⠲⠐⠮]
118 - ["1,there", ⠼⠁⠂⠞⠓⠑⠗⠑] # Numbers also set grade 1 mode
119
120 # Issue #1029 (https://github.com/liblouis/liblouis/issues/1029): Unusable output for unknown characters
121 # The following group of tests are characters not handled by the UEB table
122 # note also the dots 12567 technically not allowed in a 6-dot table.
123 - [\x201f, ⠄⡳⠭⠆⠴⠂⠋⠄, {xfail: {backward: true}}] # reverse quote
124 #- [\y1f600, ⠄⡳⠽⠂⠋⠖⠴⠴⠄, {xfail: {backward: true}}] # grinning face (FIXME: requires Liblouis to be compiled for 32-bit Unicode)
125
126 # Misc problems reported by Michael Robin (see https://github.com/liblouis/liblouis/issues/590)
127 # There are more tests in en-ueb-computer-code.yaml
128 - [context, ⠒⠞⠑⠭⠞]
129 - [':text', ⠰⠒⠞⠑⠭⠞]
130
131 - [alth, ⠁⠇⠞⠓]
132 - [bef, ⠃⠑⠋]
133 - [concv, ⠉⠕⠝⠉⠧]
134 - [concvg, ⠉⠕⠝⠉⠧⠛]
135 - [ea, ⠑⠁]
136 - [fst, ⠋⠎⠞]
137 - [herf, ⠓⠑⠗⠋]
138 - [xf, ⠰⠭⠋]
139 - [ourfs, ⠳⠗⠋⠎]
140 - [percv, ⠏⠑⠗⠉⠧]
141 - [percvg, ⠏⠑⠗⠉⠧⠛]
142 - [perh, ⠏⠑⠗⠓]
143 - [themvs, ⠞⠓⠑⠍⠧⠎]
144 - [thyf, ⠞⠓⠽⠋]
145
146 - [Disc, ⠠⠙⠊⠎⠉]
147 - [Disk, ⠠⠙⠊⠎⠅]
148 - [DISC, ⠠⠠⠙⠊⠎⠉]
149 - [DISK, ⠠⠠⠙⠊⠎⠅]
150 - [discs, ⠙⠊⠎⠉⠎]
151 - [disks, ⠙⠊⠎⠅⠎]
152 - [Discs, ⠠⠙⠊⠎⠉⠎]
153 - [Disks, ⠠⠙⠊⠎⠅⠎]
154 - [Disc…, ⠠⠙⠊⠎⠉⠲⠲⠲]
155 - [Disk…, ⠠⠙⠊⠎⠅⠲⠲⠲]
156 - [disc=, ⠙⠊⠎⠉⠐⠶]
157 - [disc+, ⠙⠊⠎⠉⠐⠖]
158 - [disc_, ⠙⠊⠎⠉⠨⠤]
159 - [disc/, ⠙⠊⠎⠉⠸⠌]
160 - [disc\\, ⠙⠊⠎⠉⠸⠡]
161 - [disc|, ⠙⠊⠎⠉⠸⠳]
162 - [disc@, ⠙⠊⠎⠉⠈⠁]
163 - [disc#, ⠙⠊⠎⠉⠸⠹]
164 - [disc$, ⠙⠊⠎⠉⠈⠎]
165 - [disc%, ⠙⠊⠎⠉⠨⠴]
166 - [disc^, ⠙⠊⠎⠉⠈⠢]
167 - [disc&, ⠙⠊⠎⠉⠈⠯]
168 - [disc*, ⠙⠊⠎⠉⠐⠔]
169 - [disc~, ⠙⠊⠎⠉⠈⠔]
170 - [disk=, ⠙⠊⠎⠅⠐⠶]
171 - [disk+, ⠙⠊⠎⠅⠐⠖]
172 - [disk_, ⠙⠊⠎⠅⠨⠤]
173 - [disk/, ⠙⠊⠎⠅⠸⠌]
174 - [disk\\, ⠙⠊⠎⠅⠸⠡]
175 - [disk|, ⠙⠊⠎⠅⠸⠳]
176 - [disk@, ⠙⠊⠎⠅⠈⠁]
177 - [disk#, ⠙⠊⠎⠅⠸⠹]
178 - [disk$, ⠙⠊⠎⠅⠈⠎]
179 - [disk%, ⠙⠊⠎⠅⠨⠴]
180 - [disk^, ⠙⠊⠎⠅⠈⠢]
181 - [disk&, ⠙⠊⠎⠅⠈⠯]
182 - [disk*, ⠙⠊⠎⠅⠐⠔]
183 - [disk~, ⠙⠊⠎⠅⠈⠔]
184
185 - ["Action group", ⠠⠁⠉⠰⠝ ⠛⠗⠳⠏]
186 - ["Action. Group", ⠠⠁⠉⠰⠝⠲ ⠠⠛⠗⠳⠏]
187 - ["Action-group", ⠠⠁⠉⠰⠝⠤⠛⠗⠳⠏]
188 - ["Action/group", ⠠⠁⠉⠰⠝⠸⠌⠛⠗⠳⠏]
189 - ["Action\\\\group", ⠠⠁⠉⠰⠝⠸⠡⠛⠗⠳⠏]
190 - ["Action$group", ⠠⠁⠉⠰⠝⠈⠎⠛⠗⠳⠏]
191
192 - ["Disk group", ⠠⠙⠊⠎⠅ ⠛⠗⠳⠏]
193 - ["Disk. Group", ⠠⠙⠊⠎⠅⠲ ⠠⠛⠗⠳⠏]
194 - ["Disk-group", ⠠⠙⠊⠎⠅⠤⠛⠗⠳⠏]
195 - ["Disk/group", ⠠⠙⠊⠎⠅⠸⠌⠛⠗⠳⠏]
196 - ["Disk\\\\group", ⠠⠙⠊⠎⠅⠸⠡⠛⠗⠳⠏]
197 - ["disk@group", ⠙⠊⠎⠅⠈⠁⠛⠗⠳⠏]
198 - ["disk%group", ⠙⠊⠎⠅⠨⠴⠛⠗⠳⠏]
199 - ["disk$group", ⠙⠊⠎⠅⠈⠎⠛⠗⠳⠏]
200
201 - [discv, ⠙⠊⠎⠉⠧]
202 - [".cv", ⠰⠲⠉⠧]
203 - [discount, ⠲⠉⠨⠞]
204 - [".count", ⠰⠲⠉⠨⠞]
205
206 - [reason, ⠗⠂⠎⠕⠝]
207 - ["r,son", ⠗⠰⠂⠎⠕⠝]
208
209 - [_, ⠨⠤]
210 - [__, ⠨⠤⠨⠤]
211 - [___, ⠨⠤⠨⠤⠨⠤]
212 - [____, ⠨⠤⠨⠤⠨⠤⠨⠤]
213 - [_____, ⠨⠤⠨⠤⠨⠤⠨⠤⠨⠤]
214 - [______, ⠨⠤⠨⠤⠨⠤⠨⠤⠨⠤⠨⠤]
215 - [_______, ⠨⠤⠨⠤⠨⠤⠨⠤⠨⠤⠨⠤⠨⠤]
216 - [________, ⠨⠤⠨⠤⠨⠤⠨⠤⠨⠤⠨⠤⠨⠤⠨⠤]
217 - [_________, ⠨⠤⠨⠤⠨⠤⠨⠤⠨⠤⠨⠤⠨⠤⠨⠤⠨⠤]
218 - [__________, ⠨⠤⠨⠤⠨⠤⠨⠤⠨⠤⠨⠤⠨⠤⠨⠤⠨⠤⠨⠤]
219
220 - [accept, ⠁⠒⠑⠏⠞]
221 - ["a:ept", ⠁⠰⠒⠑⠏⠞]
222 - [affect, ⠁⠖⠑⠉⠞]
223 - ["a!ect", ⠁⠰⠖⠑⠉⠞]
224
225 - [bubbles, ⠃⠥⠆⠇⠑⠎]
226 - ["bu;les", ⠃⠥⠰⠆⠇⠑⠎]
227 - ['"what?', ⠦⠱⠁⠞⠦]
228 - ['?what?', ⠰⠦⠱⠁⠞⠦]
229
230 # Issue with "those" reported by APH
231 - ["these those", ⠘⠮ ⠘⠹]
232 - ["these/those", ⠘⠮⠸⠌⠘⠹]
233 - ["these\\\\those", ⠘⠮⠸⠡⠘⠹]
234 - ['"those."', ⠦⠘⠹⠲⠴]
235
236 # nocontractsign scope should lapse at seqdelimiter boundaries,
237 # allowing contractions to resume
238 - [g-f-nothing, ⠰⠛⠤⠰⠋⠤⠝⠕⠹⠬]
239 - [G-F-Nothing, ⠰⠠⠛⠤⠰⠠⠋⠤⠠⠝⠕⠹⠬]
240 - [G-F-N, ⠰⠠⠛⠤⠰⠠⠋⠤⠰⠠⠝]
241 - [gd-format, ⠰⠛⠙⠤⠿⠍⠁⠞]
242
243 # Backtranslation emphasis detection tests
244 # These verify that emphasis indicators in braille are correctly detected
245 # and the typeform buffer is populated during backtranslation.
246 flags: {testmode: backward}
247 tests:
248 # Single letter emphasis
249 - [⠨⠆⠞⠑⠎⠞, test, {expected_typeform: {italic: '+ '}}]
250 - [⠘⠆⠞⠑⠎⠞, test, {expected_typeform: {bold: '+ '}}]
251 - [⠸⠆⠞⠑⠎⠞, test, {expected_typeform: {underline: '+ '}}]
252
253 # Word emphasis
254 - [⠨⠂⠺⠕⠗⠙⠨⠄, word, {expected_typeform: {italic: '++++'}}]
255 - [⠘⠂⠺⠕⠗⠙⠘⠄, word, {expected_typeform: {bold: '++++'}}]
256
257 # Phrase emphasis
258 - [⠨⠶⠓⠊ ⠞⠓⠑⠗⠑⠨⠄, "hi there", {expected_typeform: {italic: '++++++++'}}]
259
260 # Mixed emphasis
261 - [⠁⠨⠆⠃⠉, abc, {expected_typeform: {italic: ' + '}}]
262
263 # Nested emphasis - italic and bold on same word
264 - - ⠨⠂⠘⠂⠞⠑⠎⠞⠘⠄⠨⠄
265 - test
266 - expected_typeform:
267 italic: '++++'
268 bold: '++++'