Debian Codegraph @

tests/yaml/undefined.yaml

raw symbols SCIP
1 table: |
2 include tables/unicode.dis
3 flags: {testmode: backward}
4 tests:
5 # verify no dots
6 - - "⠀"
7 - "\\\\0/"
8
9 table: |
10 include tables/unicode.dis
11 include tables/spaces.uti
12 flags: {testmode: backward}
13 tests:
14 # verify that each undefined dot is rendered as its correct number
15 - - "⠁ ⠂ ⠄ ⠈ ⠐ ⠠ ⡀ ⢀"
16 - "\\\\1/ \\\\2/ \\\\3/ \\\\4/ \\\\5/ \\\\6/ \\\\7/ \\\\8/"
17
18 # verify that the dot numbers are rendered in ascending order
19 - - "⠃ ⠆ ⠌ ⠘ ⠰ ⡠ ⣀"
20 - "\\\\12/ \\\\23/ \\\\34/ \\\\45/ \\\\56/ \\\\67/ \\\\78/"
21
22 table: |
23 include tables/unicode.dis
24 flags: {testmode: backward}
25 tests:
26 - - ⠸
27 - \\456/
28 - - ⠸
29 - ""
30 - mode: [noUndefined]
31
32 table: |
33 include tables/unicode.dis
34 include tables/spaces.uti
35 include tables/latinLetterDef6Dots.uti
36 display + 346
37 display % 146
38 display ( 12356
39 display ) 23456
40 flags: {testmode: backward}
41 tests:
42
43 # by default undefined dot patterns are printed as follows
44 - - ⠌
45 - \\34/
46 - outputPos: [0]
47 inputPos: [0, 0, 0, 0]
48
49 # in backward translation, the noUndefined mode omits undefined dot patterns
50 - - ⠌
51 - ""
52 - outputPos: [-1]
53 inputPos: []
54 mode: [noUndefined]
55
56 - - "( +% )"
57 - "\\\\12356/ \\\\346/\\\\146/ \\\\23456/"
58 - outputPos: [0, 7, 8, 13, 18, 19]
59 inputPos: [0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 5, 5, 5, 5, 5, 5, 5]
60
61 - - "( +% )"
62 - " "
63 - outputPos: [0, 0, 1, 1, 1, 1]
64 inputPos: [0, 2]
65 mode: [noUndefined]
66
67 table: |
68 include tables/unicode-without-blank.dis
69 include tables/spaces.uti
70 include tables/latinLetterDef6Dots.uti
71 include tables/loweredDigits6Dots.uti
72 sign \\ 16
73 sign ' 3
74 flags: {testmode: forward}
75 tests:
76
77 # by default undefined characters are converted to an escape sequence and then to braille
78 - - "\u2026"
79 - ⠄⠡⠭⠆⠴⠆⠖⠄
80 - outputPos: [0]
81 inputPos: [0, 0, 0, 0, 0, 0, 0, 0]
82
83 # in forward translation, the noUndefined mode omits undefined characters
84 - - "\u2026"
85 - ""
86 - outputPos: [-1]
87 inputPos: []
88 mode: [noUndefined]
89
90 - - "\u2018xyz\u2026\u22EEjkl\u2019"
91 - ⠄⠡⠭⠆⠴⠂⠦⠄⠭⠽⠵⠄⠡⠭⠆⠴⠆⠖⠄⠄⠡⠭⠆⠆⠑⠑⠄⠚⠅⠇⠄⠡⠭⠆⠴⠂⠔⠄
92 - outputPos: [0, 8, 9, 10, 11, 19, 27, 28, 29, 30]
93 inputPos: [0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 7, 8, 9, 9, 9, 9, 9, 9, 9, 9]
94
95 - - "\u2018xyz\u2026\u22EEjkl\u2019"
96 - "⠭⠽⠵⠚⠅⠇"
97 - outputPos: [0, 0, 1, 2, 2, 2, 3, 4, 5, 5]
98 inputPos: [1, 2, 3, 6, 7, 8]
99 mode: [noUndefined]
100
101 # the undefined opcode has precedence over the noUndefined mode
102 table: |
103 include tables/unicode-without-blank.dis
104 include tables/spaces.uti
105 include tables/latinLetterDef6Dots.uti
106 include tables/loweredDigits6Dots.uti
107 sign \\ 16
108 sign ' 3
109 undefined 1368
110 flags: {testmode: forward}
111 tests:
112
113 - - \x2026
114 - ⢥
115
116 - - \x2026
117 - ⢥
118 - mode: [noUndefined]
119
120 # verify that all the fallback dot patterns needed to render undefined characters in hexadecimal work
121 # for example if \ and ' are not defined in the table, the escape sequence is translated using 12567 for \ and 3 for '
122 table: |
123 include tables/unicode.dis
124 # don't define any characters so that the fallback dot patterns will be used
125 flags: {testmode: forward}
126 tests:
127
128 - - "\\x98ab\\x76cd \\x54ef\\x3210"
129 - "⠄⡳⠭⠔⠦⠁⠃⠄⠄⡳⠭⠶⠖⠉⠙⠄⠄⡳⠭⠴⠴⠆⠴⠄⠄⡳⠭⠢⠲⠑⠋⠄⠄⡳⠭⠒⠆⠂⠴⠄"
130
131 # noUndefined has no effect on characters and dots that are matched by a translation rule
132 table: |
133 include tables/unicode.dis
134 always xx 34
135 flags: {testmode: bothDirections}
136 tests:
137 - - xx
138 - ⠌
139 - outputPos: [0, 0]
140 inputPos: [0]
141 mode: [noUndefined]