Debian Codegraph @

tests/yaml/multipass-forward.yaml

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