Debian Codegraph @

tests/yaml/various-regression-tests.yaml

raw symbols SCIP
1 # Collection of various regression tests
2
3 # Test that are related to a certain issue that was fixed and don't
4 # have a place in a YAML file dedicated to a specific feature or
5 # opcode can be placed in this file.
6
7 # ----------------------
8 # Regression test for issue #35: "AAs" translates to ",,aas" (https://github.com/liblouis/liblouis/issues/35)
9 table: |
10 include tables/spaces.uti
11 include tables/text_nabcc.dis
12 lowercase a 1
13 base uppercase A a
14 punctuation ' 3
15 punctuation , 6
16 punctuation ; 56
17 multind 56-6 letsign capsletter
18 letsign 56
19 capsletter 6
20 begcapsword 6-6
21 endcapsword 6-3
22 tests:
23 - - "A Aa AAa AAAa"
24 - ";,a ,aa ,,aa,'a ,,aaa,'a"
25 - - "AAa AAa"
26 - ",,aa,'a ,,aa,'a"
27
28 # ----------------------
29 # Regression test for issue #77: Translating "---.com" with UEBC-g2.ctb causes infinite loop
30 # (https://github.com/liblouis/liblouis/issues/77)
31 # The issue was fixed by https://github.com/liblouis/liblouis/pull/799.
32
33 # The table below makes liblouis hang
34 table: |
35 include tables/latinLetterDef6Dots.uti
36 punctuation . 256
37 punctuation - 36
38 nocont .com
39 repeated --- 6-36-6-36-6-36
40 tests:
41 - [--.com, --.com]
42 - [---.com, ---.com]
43
44 # if I remove the nocont rule it doesn't hang
45 table: |
46 include tables/latinLetterDef6Dots.uti
47 punctuation . 256
48 punctuation - 36
49 display \s 6
50 repeated --- 6-36-6-36-6-36
51 tests:
52 - [---.com, " - - -.com"]
53
54 # also if I remove the repeated rule it doesn't hang
55 table: |
56 include tables/latinLetterDef6Dots.uti
57 punctuation . 256
58 punctuation - 36
59 nocont .com
60 tests:
61 - [---.com, ---.com]
62
63 # ----------------------
64 # This test was added in https://github.com/liblouis/liblouis/pull/109.
65 # The second line ("three bold words") would fail unless the first
66 # line ("three italic words") was commented out. The first translation
67 # was somehow influencing the second one.
68 table: [tables/unicode-without-blank.dis, tables/en-ueb-g1.ctb]
69 tests:
70 - [three italic words, ⠨⠶⠞⠓⠗⠑⠑ ⠊⠞⠁⠇⠊⠉ ⠺⠕⠗⠙⠎⠨⠄, {typeform: {italic: '++++++++++++++++++'}}]
71 - [three bold words, ⠘⠶⠞⠓⠗⠑⠑ ⠃⠕⠇⠙ ⠺⠕⠗⠙⠎⠘⠄, {typeform: {bold: '++++++++++++++++'}}]
72
73 # ----------------------
74 # Regression test for issue #238: Pass2 with swapdd opcode selects wrong dot pattern
75 # (https://github.com/liblouis/liblouis/issues/238)
76 # The issue was fixed by https://github.com/liblouis/liblouis/pull/536 (commit 0d3aaac).
77 table: |
78 include tables/da-dk-g08.ctb
79 swapdd AddSeven 1,12,14,145,15,124,1245,125,24,245 17,127,147,1457,157,1247,12457,1257,247,2457
80 noback pass2 %AddSeven %AddSeven
81 tests:
82 - - abc
83 - ABC
84
85 # ----------------------
86 # Regression test for issue #412: Word wrapping not working with en-us-g1.ctb (https://github.com/liblouis/liblouis/issues/412)
87 # Back-tracking was not working with all caps words.
88 # The issue was fixed by https://github.com/liblouis/liblouis/pull/567.
89 table: [tables/en-us-g1.ctb]
90 tests:
91 - - "SARVESH KUMAR Upadhyay"
92 - ",,sarvesh ,,kumar ,upadhyay"
93 - - "SARVESH KUMAR Upadhyay"
94 - ",,sarvesh ,,kumar "
95 - maxOutputLength: 25
96 - - "SARVESH KUMAR UPADHYAY"
97 - ",,sarvesh ,,kumar "
98 - maxOutputLength: 25
99
100 # ----------------------
101 # Regression test for issue #498: Preserve case when "context" statements work in a braille table
102 # (https://github.com/liblouis/liblouis/issues/498)
103 # The issue was fixed by https://github.com/liblouis/liblouis/pull/756.
104
105 table: |
106 space \s 0
107 include tables/latinLetterDef8Dots.uti
108 tests:
109 - - AB cd Ef gH
110 - AB cd Ef gH
111
112 table: |
113 display - 36
114 space \s 0
115 include tables/latinLetterDef8Dots.uti
116 noback context $l[]$l @36
117 tests:
118 - [AB, A-B]
119 - [cd, c-d]
120 - [Ef, E-f]
121 - [gH, g-H]
122
123 # ----------------------
124 # Regression test related to issue #537: [Feature Request] Better granularity of cursor moving
125 # (https://github.com/liblouis/liblouis/issues/537)
126 # There was a bug in the input output mapping of context rules.
127 # The issue was fixed by https://github.com/liblouis/liblouis/pull/547.
128 table: |
129 include tables/braille-patterns.cti
130 letter \x4EA4 13-246-3
131 letter \x6A02 14-2346-5
132 letter \x97FF 15-46-4
133 noback context "\x4EA4\x97FF"["\x6A02"] @236-5
134 tests:
135 - - 交
136 - ⠅⠪⠄
137 - outputPos: [0]
138 inputPos: [0,0,0]
139 - - 響
140 - ⠑⠨⠈
141 - outputPos: [0]
142 inputPos: [0,0,0]
143 - - 樂
144 - ⠉⠮⠐
145 - outputPos: [0]
146 inputPos: [0,0,0]
147 - - 交響樂
148 - ⠅⠪⠄⠑⠨⠈⠦⠐
149 - outputPos: [0,3,6]
150 inputPos: [0,0,0,1,1,1,2,2]
151
152 # ----------------------
153 # Regression test for issue #583: en-ueb-g1.ctb back translation returns wrong inlen
154 # (https://github.com/liblouis/liblouis/issues/583)
155 # The issue was fixed by https://github.com/liblouis/liblouis/pull/624.
156 table: |
157 include tables/en-ueb-g1.ctb
158 flags: {testmode: backward}
159 tests:
160 - - "`>`>"
161 - ">>"
162
163 # ----------------------
164 # Regression test for issue #584: en-ueb-g1.ctb back translation of undefined braille does not fill in inpos
165 # (https://github.com/liblouis/liblouis/issues/584)
166 # The issue was fixed by https://github.com/liblouis/liblouis/pull/624.
167 table: |
168 include tables/en-ueb-g1.ctb
169 flags: {testmode: backward}
170 tests:
171 - - ">>"
172 - "\\\\345/\\\\345/"
173 - inputPos: [0,0,0,0,0,1,1,1,1,1]
174
175 # ----------------------
176 # Regression test for issue #886: Example found where inputPos array is not monotonically increasing
177 # (https://github.com/liblouis/liblouis/issues/886)
178 # The issue was fixed by https://github.com/liblouis/liblouis/pull/889.
179 display: tables/unicode.dis
180 table: |
181 include tables/latinLetterDef6Dots.uti
182 include tables/digits8Dots.uti
183 include tables/litdigits6Dots.uti
184 numsign 3456
185 emphclass italic
186 emphclass underline
187 emphclass bold
188 emphclass super
189 emphletter super 46
190 begemph super 46-236
191 endemph super 346
192 tests:
193 - - "rs4954"
194 - "⠨⠦⠗⠎⠬⠼⠙⠊⠑⠙"
195 - typeform:
196 super: '++ '
197 inputPos: [0, 0, 0, 1, 1, 2, 2, 3, 4, 5]