Debian Codegraph @

tests/yaml/multipass-backward.yaml

raw symbols SCIP
1 table: |
2 include tables/unicode.dis
3 include tables/en-us-comp8.ctb
4 nofor correct $d "d" # digit
5 nofor correct $m "m" # math
6 nofor correct $p "p" # punctuation
7 nofor correct $s "s" # space
8 nofor correct $S "S" # sign
9 nofor correct $u "u" # lowercase
10 nofor correct $U "U" # uppercase
11 flags: {testmode: backward}
12 tests:
13 - # specific attributes
14 - ⠢⠬⠱⠀⠸⠭⡽
15 - dmpsSuU
16
17 table: |
18 include tables/unicode.dis
19 include tables/en-ueb-g1.ctb
20 nofor correct $D "D" # literary digit
21 nofor correct $l "l" # letter
22 nofor correct $a "a" # any
23 flags: {testmode: backward}
24 tests:
25 - # general attributes
26 - ⠼⠑⠭⠤⡽
27 - Dlal
28
29 table: |
30 include tables/unicode.dis
31 include tables/en-us-comp8.ctb
32 nofor context $p "p" # punctuation
33 flags: {testmode: backward}
34 tests:
35 - # context attributes
36 - ⠿⠨⠬
37 - =p+
38
39 table: |
40 include tables/unicode.dis
41 include tables/en-us-comp8.ctb
42 attribute one abcde
43 attribute two fghij
44 attribute three klmno
45 attribute four pqrst
46 attribute five uvwxyz
47 nofor correct $w. "w"
48 nofor correct $x. "x"
49 nofor correct $y. "y"
50 nofor correct $z. "z"
51 nofor correct %five. "5"
52 swapcc nestcc ([{< )]}>
53 nofor correct %nestcc. %nestcc
54 swapcd nestcd )]}> 1234-1,234-12345,14-136,1-1345
55 nofor context %nestcd %nestcd
56 grouping brackets \x0001\x0002 123478,145678
57 nofor correct {brackets}brackets }brackets{brackets
58 flags: {testmode: backward}
59 tests:
60 - # classes
61 - ⠇⠑⠞⠞⠑⠗⠎ ⠺⠭⠽⠵ ⠑⠟⠥⠁⠞⠑ ⠞⠕ ⠞⠓⠑ ⠂⠎⠞ ⠋⠕⠥⠗ ⠥⠎⠑⠗ ⠉⠇⠁⠎⠎⠑⠎
62 - ywzwz 5 wz5wzw zy zxw 1z xy5z 5zwz wywzwz
63 - # swap
64 - ⡪⠷⠣⠪
65 - sqpaancu
66 - xfail: not fixed
67 - # grouping
68 - ⣹⣏
69 - \x0001\x0002
70 - xfail: not implemented
71
72 table: |
73 include tables/unicode.dis
74 include tables/en-us-comp8.ctb
75 nofor correct $l4-5 "z"
76 nofor correct $l2 "y"
77 nofor correct $l "x"
78 flags: {testmode: backward}
79 tests:
80 - # one letter
81 - ⠁
82 - x
83 - # two letters
84 - ⠁⠃
85 - y
86 - # three letters
87 - ⠁⠃⠉
88 - yx
89 - # four letters
90 - ⠁⠃⠉⠙
91 - z
92 - # five letters
93 - ⠁⠃⠉⠙⠑
94 - z
95 - # six letters
96 - ⠁⠃⠉⠙⠑⠋
97 - zx
98
99 table: |
100 include tables/unicode.dis
101 include tables/en-us-comp8.ctb
102 nofor correct [$d5]_6 "f" # fail
103 nofor correct [$d5]_5 "s" # succeed
104 nofor correct `$d "f" # first
105 nofor correct $d~ "l" # last
106 nofor correct $d "m" # middle
107 flags: {testmode: backward}
108 tests:
109 - # lookback count
110 - ⠂⠆⠒⠲⠢
111 - s
112 - # first/last
113 - ⠂⠆⠒
114 - fml
115
116 table: |
117 include tables/unicode.dis
118 include tables/en-us-comp8.ctb
119 nofor correct `$l9~ *
120 nofor correct `$l3[$d.]$l3~ *
121 nofor correct `$l2[$d.]$l2~ "("*"|"*")"
122 nofor correct `$d3[$l.]$d3~ ?
123 flags: {testmode: backward}
124 tests:
125 - # copy no brackets
126 - ⠁⠃⠉⠙⠑⠋⠛⠓⠊
127 - abcdefghi
128 - # copy once
129 - ⠁⠃⠉⠲⠢⠖⠛⠓⠊
130 - 456
131 - # copy twice
132 - ⠁⠃⠒⠲⠢⠖⠶⠓⠊
133 - (34567|34567)
134 - # omit
135 - ⠂⠆⠒⠙⠑⠋⠶⠦⠔
136 - 123789
137
138 table: |
139 include tables/unicode.dis
140 include tables/en-us-comp8.ctb
141 nofor correct #1=0"0" *
142 nofor correct "+" #1+?
143 nofor correct "-" #1-?
144 nofor correct #1=3"e" *
145 nofor correct !#1=3"E" *
146 nofor correct #1<3"l" *
147 nofor correct !#1<3"L" *
148 nofor correct #1>3"g" *
149 nofor correct !#1>3"G" *
150 nofor correct #1<=3"x" *
151 nofor correct !#1<=3"X" *
152 nofor correct #1>=3"y" *
153 nofor correct !#1>=3"Y" *
154 nofor correct "=" #1=15?
155 nofor correct #1=15"z" *
156 nofor correct $a ?
157 flags: {testmode: backward}
158 tests:
159 - # variables
160 - ⠴⠤⠬⠬⠬⠬⠬⠤⠤⠑⡑⠇⡇⠛⡛⠭⡭⠽⡽⠤⠑⡑⠇⡇⠛⡛⠭⡭⠽⡽⠬⠬⠑⡑⠇⡇⠛⡛⠭⡭⠽⡽⠿⠵
161 - 0eLGxyElGxYELgXyz
162
163 table: |
164 include tables/unicode.dis
165 include tables/en-us-comp8.ctb
166 nofor correct #1=0"4" #1=5"5"
167 nofor context #1=0@25 #1=4"4"
168 nofor pass2 #1=0@23 #1=3@25
169 nofor pass3 #1=0@2 #1=2@23
170 nofor pass4 #1=0@356 #1=1@2
171 flags: {testmode: backward}
172 tests:
173 - # pass order
174 - ⠴
175 - 5
176
177 # Multipass rules should not go in endless loop when startMatch == endReplace
178 table: |
179 include tables/unicode-without-blank.dis
180 include tables/en-us-comp8.ctb
181 nofor correct []"bar0" "foo"
182 nofor context []@12-1-1235-2 "foo"
183 nofor pass2 []@12-1-1235-23 @124-135-135
184 flags: {testmode: backward}
185 tests:
186 - - ⠃⠁⠗⠴
187 - foobar0
188 - - ⠃⠁⠗⠂
189 - foobar1
190 - xfail: context rule can still cause endless loop
191 - - ⠃⠁⠗⠆
192 - foobar2
193
194 table: |
195 include tables/unicode.dis
196 include tables/loweredDigits6Dots.uti
197 include tables/latinLetterDef6Dots.uti
198 nofor context `[]$l "foo"
199 flags: {testmode: backward}
200 tests:
201 - - ⠃⠁⠗⠂
202 - foobar1
203 - xfail: context rule can still cause endless loop
204
205 table: |
206 include tables/unicode.dis
207 include tables/loweredDigits6Dots.uti
208 include tables/latinLetterDef6Dots.uti
209 nofor pass2 `[]$l @124-135-135
210 flags: {testmode: backward}
211 tests:
212 - - ⠃⠁⠗⠆
213 - foobar2
214