Skip to content

Commit 1fa6338

Browse files
committed
Changed longer pattern-selection tests to use arrays of src strings
1 parent 1c72f5b commit 1fa6338

File tree

1 file changed

+47
-7
lines changed

1 file changed

+47
-7
lines changed

test/tests/pattern-selection.json

Lines changed: 47 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@
5858
"exp": "1.0"
5959
},
6060
{
61-
"src": ".input {$x :test:select decimalPlaces=9} .local $y = {$x :test:select decimalPlaces=1} .match $y 1.0 {{1.0}} 1 {{1}} * {{bad-option-value}}",
61+
"srcs": [".input {$x :test:select decimalPlaces=9}",
62+
".local $y = {$x :test:select decimalPlaces=1}",
63+
".match $y 1.0",
64+
"{{1.0}} 1",
65+
"{{1}} * {{bad-option-value}}",
6266
"params": [{ "name": "x", "value": 1 }],
6367
"exp": "bad-option-value",
6468
"expErrors": [
@@ -91,28 +95,64 @@
9195
]
9296
},
9397
{
94-
"src": ".local $x = {1 :test:select} .local $y = {1 :test:select} .match $x $y 1 1 {{1,1}} 1 * {{1,*}} * 1 {{*,1}} * * {{*,*}}",
98+
"src": [".local $x = {1 :test:select}",
99+
".local $y = {1 :test:select}",
100+
".match $x $y",
101+
"1 1 {{1,1}}",
102+
"1 * {{1,*}}",
103+
"* 1 {{*,1}}",
104+
"* * {{*,*}}",
95105
"exp": "1,1"
96106
},
97107
{
98-
"src": ".local $x = {1 :test:select} .local $y = {0 :test:select} .match $x $y 1 1 {{1,1}} 1 * {{1,*}} * 1 {{*,1}} * * {{*,*}}",
108+
"src": [".local $x = {1 :test:select}",
109+
".local $y = {0 :test:select}",
110+
".match $x $y",
111+
"1 1 {{1,1}}",
112+
"1 * {{1,*}}",
113+
"* 1 {{*,1}}",
114+
"* * {{*,*}}",
99115
"exp": "1,*"
100116
},
101117
{
102-
"src": ".local $x = {0 :test:select} .local $y = {1 :test:select} .match $x $y 1 1 {{1,1}} 1 * {{1,*}} * 1 {{*,1}} * * {{*,*}}",
118+
"src": [".local $x = {0 :test:select}",
119+
".local $y = {1 :test:select}",
120+
".match $x $y",
121+
"1 1 {{1,1}}",
122+
"1 * {{1,*}}",
123+
"* 1 {{*,1}}",
124+
"* * {{*,*}}",
103125
"exp": "*,1"
104126
},
105127
{
106-
"src": ".local $x = {0 :test:select} .local $y = {0 :test:select} .match $x $y 1 1 {{1,1}} 1 * {{1,*}} * 1 {{*,1}} * * {{*,*}}",
128+
"src": [".local $x = {0 :test:select}",
129+
".local $y = {0 :test:select}",
130+
".match $x $y",
131+
"1 1 {{1,1}}",
132+
"1 * {{1,*}}",
133+
"* 1 {{*,1}}",
134+
"* * {{*,*}}",
107135
"exp": "*,*"
108136
},
109137
{
110-
"src": ".local $x = {1 :test:select fails=select} .local $y = {1 :test:select} .match $x $y 1 1 {{1,1}} 1 * {{1,*}} * 1 {{*,1}} * * {{*,*}}",
138+
"src": [".local $x = {1 :test:select fails=select}",
139+
".local $y = {1 :test:select}",
140+
".match $x $y",
141+
"1 1 {{1,1}}",
142+
"1 * {{1,*}}",
143+
"* 1 {{*,1}}",
144+
"* * {{*,*}}",
111145
"exp": "*,1",
112146
"expErrors": [{ "type": "bad-selector" }]
113147
},
114148
{
115-
"src": ".local $x = {1 :test:select} .local $y = {1 :test:format} .match $x $y 1 1 {{1,1}} 1 * {{1,*}} * 1 {{*,1}} * * {{*,*}}",
149+
"src": [".local $x = {1 :test:select}",
150+
".local $y = {1 :test:format}",
151+
".match $x $y",
152+
"1 1 {{1,1}}",
153+
"1 * {{1,*}}",
154+
"* 1 {{*,1}}",
155+
"* * {{*,*}}",
116156
"exp": "1,*",
117157
"expErrors": [{ "type": "bad-selector" }]
118158
}

0 commit comments

Comments
 (0)