Debian Codegraph @

tests/yaml/capsword.yaml

raw symbols SCIP
1 table: |
2 display , 456
3 display # 3456
4 display ; 56
5 display . 5
6 display - 36
7 sign % 123456
8 punctuation - 36
9 include tables/spaces.uti
10 include tables/latinLetterDef6Dots.uti
11 include tables/digits6Dots.uti
12 include tables/litdigits6Dots.uti
13 include tables/braille-patterns.cti
14 numsign 3456
15 nocontractsign 56
16 nonumsign 56
17 numericnocontchars abcdefghij
18 begcapsword 456
19 endcapsword 5
20 capsmodechars -
21
22 flags: {testmode: bothDirections}
23 tests:
24 # endcapsword cancels a word in capitals
25 - - "ABCabc"
26 - ",abc.abc"
27 # whitespace cancels a word in capitals
28 - - "ABC abc"
29 - ",abc abc"
30 # non-letter cancels a word in capitals
31 - - "ABC%abc"
32 - ",abc%abc"
33 # number cancels a word in capitals
34 # see https://github.com/liblouis/liblouis/issues/400
35 - - "ABC123abc"
36 - ",abc#abc;abc"
37 # capsmodechars do not cancel a capsword
38 - - "ABC-abc"
39 - ",abc-.abc"
40
41 # endcapsword should cancel capsword no matter what and should be ignored if not needed
42 flags: {testmode: backward}
43 tests:
44 - - ",abc-abc."
45 - "ABC-ABC"
46 flags: {testmode: forward}
47 tests:
48 - - "ABC-ABC"
49 - ",abc-abc"
50
51 # Compare with behavior of begcaps/endcaps
52 table: |
53 display , 456
54 display # 3456
55 display ; 56
56 display . 5
57 display - 36
58 sign % 123456
59 punctuation - 36
60 include tables/spaces.uti
61 include tables/latinLetterDef6Dots.uti
62 include tables/digits6Dots.uti
63 include tables/litdigits6Dots.uti
64 include tables/braille-patterns.cti
65 numsign 3456
66 nocontractsign 56
67 nonumsign 56
68 numericnocontchars abcdefghijABC
69 begcaps 456
70 endcaps 5
71 capsmodechars -
72
73 flags: {testmode: bothDirections}
74 tests:
75 # endcaps cancels a block in capitals
76 - - "ABCabc"
77 - ",abc.abc"
78 # whitespace does not cancel a block in capitals
79 - - "ABC ABC"
80 - ",abc abc."
81 # non-letter does not cancel a block in capitals
82 - - "ABC%ABC"
83 - ",abc%abc."
84 # number does not cancel a block in capitals
85 # contractsign before "ABC" because "A" is a numericnocontchars
86 - - "ABC123ABC"
87 - ",abc#abc;abc."
88 # numericnocontchars are case sensitive, so no contractsign before "DEF"
89 - - "ABC123DEF"
90 - ",abc#abc;abc."
91 - {xfail: "missing nocontractsign after number (see issue #631)"}
92 # capsmodechars should have no effect on begcaps and endcaps
93 - - "ABC-abc"
94 - ",abc-.abc"
95 - - "ABC-ABC"
96 - ",abc-abc."
97
98 # endcaps not needed at the end of a string
99 flags: {testmode: backward}
100 tests:
101 - - ",abc abc"
102 - "ABC ABC"
103 - - ",abc%abc"
104 - "ABC%ABC"
105 - - ",abc-abc"
106 - "ABC-ABC"
107
108 # Regression test for issue #361: Consistency between for and back trans with capsword and punctuation/math
109 # (https://github.com/liblouis/liblouis/issues/361)
110 # The issue was fixed by https://github.com/liblouis/liblouis/pull/611.
111 table: |
112 include tables/unicode.dis
113 punctuation . 3
114 punctuation , 2
115 punctuation - 36
116 math + 235
117 include tables/latinLetterDef6Dots.uti
118 include tables/braille-patterns.cti
119 capsletter 6
120 begcapsword 6-6
121 endcapsword 6-3
122 flags: {testmode: bothDirections}
123 tests:
124 - [Foobar, ⠠⠋⠕⠕⠃⠁⠗]
125 - [FOOBAR, ⠠⠠⠋⠕⠕⠃⠁⠗]
126 - [FOObar, ⠠⠠⠋⠕⠕⠠⠄⠃⠁⠗]
127 - [FOO-bar, ⠠⠠⠋⠕⠕⠤⠃⠁⠗]
128 - [FOO.bar, ⠠⠠⠋⠕⠕⠄⠃⠁⠗]
129 - [FOO+bar, ⠠⠠⠋⠕⠕⠖⠃⠁⠗]
130
131 # Regression test for issue #1608: capsword mode should be terminated by
132 # non-alphabetic characters within multi-character endword rule output
133 # (https://github.com/liblouis/liblouis/issues/1608)
134 table: |
135 display , 456
136 display # 3456
137 display ; 56
138 display . 5
139 display - 36
140 display ' 3
141 sign % 123456
142 punctuation - 36
143 punctuation ' 3
144 include tables/spaces.uti
145 include tables/latinLetterDef6Dots.uti
146 include tables/digits6Dots.uti
147 include tables/litdigits6Dots.uti
148 include tables/braille-patterns.cti
149 numsign 3456
150 nocontractsign 56
151 nonumsign 56
152 numericnocontchars abcdefghij
153 begcapsword 456
154 endcapsword 5
155 endword 's 3-234
156
157 flags: {testmode: bothDirections}
158 tests:
159 # non-letter in multi-char endword output terminates capsword
160 - - "ABC's"
161 - ",abc's"
162 # endcapsword still works as before
163 - - "ABCabc"
164 - ",abc.abc"