Debian Codegraph @

tests/yaml/case-sensitivity.yaml

raw symbols SCIP
1 display: tables/unicode.dis
2
3 # when a table does not define any capital marks, rules are case sensitive
4 # test adapted from https://github.com/liblouis/liblouis/issues/498
5 table: |
6 space \s 0
7 uppercase A 17
8 uppercase C 147
9 uppercase G 12457
10 uppercase L 1237
11 uppercase O 1357
12 uppercase R 12357
13 uppercase Y 134567
14 uppercase Z 13567
15 lowercase a 1
16 lowercase c 14
17 lowercase g 1245
18 lowercase l 123
19 lowercase o 135
20 lowercase r 1235
21 lowercase y 13456
22 lowercase z 1356
23 always goal\scrazy 2347-1367-147-147-2
24 always goal\sCrazy 2347-1367-147-147-23
25 always Goal\scrazy 2347-1367-147-147-25
26 always Goal\sCrazy 2347-1367-147-147-256
27 tests:
28 - [goal crazy, ⡎⡥⡉⡉⠂] # first always rule matches
29 - [Goal crazy, ⡎⡥⡉⡉⠒] # third always rule matches
30
31 # there is a bug however that prevents rules with a capital in the
32 # middle (anywhere in the rule except the first character) to be
33 # applied: the validMatch() function checks for changes in
34 # capitalisation and does this without taking into account whether
35 # capital marks are defined or not.
36 - [goal Crazy, ⡎⡥⡉⡉⠆, xfail: uppercase C in the middle cancels rule]
37 - [Goal Crazy, ⡎⡥⡉⡉⠲, xfail: uppercase C in the middle cancels rule]
38
39 # context rules are always case sensitive
40 # test adapted from https://github.com/liblouis/liblouis/issues/498
41 table: |
42 space \s 0
43 lowercase a 1
44 lowercase c 14
45 lowercase g 1245
46 lowercase l 123
47 lowercase o 135
48 lowercase r 1235
49 lowercase y 13456
50 lowercase z 1356
51 base uppercase A a
52 base uppercase C c
53 base uppercase G g
54 base uppercase L l
55 base uppercase O o
56 base uppercase R r
57 base uppercase Y y
58 base uppercase Z z
59 noback context "goal"$s"crazy" @2347-1367-147-147-2
60 noback context "goal"$s"Crazy" @2347-1367-147-147-23
61 noback context "Goal"$s"crazy" @2347-1367-147-147-25
62 noback context "Goal"$s"Crazy" @2347-1367-147-147-256
63 noback context "gOal"$s"crazy" @123456
64 tests:
65 - [goal crazy, ⡎⡥⡉⡉⠂] # first context rule matches
66 - [goal Crazy, ⡎⡥⡉⡉⠆] # second context rule matches
67 - [Goal crazy, ⡎⡥⡉⡉⠒] # third context rule matches
68 - [Goal Crazy, ⡎⡥⡉⡉⠲] # fourth context rule matches
69
70 # the following test was added in order to show that the validMatch()
71 # bug also applies for context rules, although not in all cases (as
72 # the second and fourth test above show). the reason why the bug is
73 # triggered in the test below and not in the above tests is because
74 # validMatch() only checks for changes in capitalization within the
75 # first `charslen' characters. the uppercase "O" is in the first part,
76 # before the "$s", whereas the uppercase "C" are after the "$s".
77 - [gOal crazy, ⠿, xfail: uppercase O cancels rule]
78
79 # test taken from https://github.com/liblouis/liblouis/issues/1461
80 table: |
81 include tables/latinLetterDef6Dots.uti
82 include tables/spaces.uti
83 capsletter 6
84 begcapsword 6-6
85 lencapsphrase 3
86 begcapsphrase 6-6-6
87 endcapsphrase after 6-3
88 always ar 345
89 noback context _$l["ound"] @46-145a
90 noback context _$l["OUND"] @46-145a
91 noback pass2 [@6-46-145a] @6-1256-1345-145
92 noback pass2 [@6-6-46-145a] @6-6-1256-1345-145
93 noback pass2 [@6-3-46-145a] @6-3-1256-1345-145
94 noback pass2 @46-145a @46-145
95 tests:
96 - - "around"
97 - "⠜⠨⠙"
98 - - "Around"
99 - "⠠⠜⠨⠙"
100 - - "arOund"
101 - "⠜⠠⠕⠥⠝⠙"
102 - - "AROUND"
103 - "⠠⠠⠜⠨⠙"
104 - - "MOVE AROUND"
105 - "⠠⠠⠍⠕⠧⠑⠀⠠⠠⠜⠨⠙"
106 - - "GO MOVE AROUND"
107 - "⠠⠠⠠⠛⠕⠀⠍⠕⠧⠑⠀⠜⠨⠙⠠⠄"