Skip to content

Commit

Permalink
Changed longer pattern-selection tests to use arrays of src strings
Browse files Browse the repository at this point in the history
  • Loading branch information
catamorphism committed Nov 11, 2024
1 parent 1c72f5b commit 1fa6338
Showing 1 changed file with 47 additions and 7 deletions.
54 changes: 47 additions & 7 deletions test/tests/pattern-selection.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@
"exp": "1.0"
},
{
"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}}",
"srcs": [".input {$x :test:select decimalPlaces=9}",
".local $y = {$x :test:select decimalPlaces=1}",
".match $y 1.0",
"{{1.0}} 1",
"{{1}} * {{bad-option-value}}",
"params": [{ "name": "x", "value": 1 }],
"exp": "bad-option-value",
"expErrors": [
Expand Down Expand Up @@ -91,28 +95,64 @@
]
},
{
"src": ".local $x = {1 :test:select} .local $y = {1 :test:select} .match $x $y 1 1 {{1,1}} 1 * {{1,*}} * 1 {{*,1}} * * {{*,*}}",
"src": [".local $x = {1 :test:select}",
".local $y = {1 :test:select}",
".match $x $y",
"1 1 {{1,1}}",
"1 * {{1,*}}",
"* 1 {{*,1}}",
"* * {{*,*}}",
"exp": "1,1"
},
{
"src": ".local $x = {1 :test:select} .local $y = {0 :test:select} .match $x $y 1 1 {{1,1}} 1 * {{1,*}} * 1 {{*,1}} * * {{*,*}}",
"src": [".local $x = {1 :test:select}",
".local $y = {0 :test:select}",
".match $x $y",
"1 1 {{1,1}}",
"1 * {{1,*}}",
"* 1 {{*,1}}",
"* * {{*,*}}",
"exp": "1,*"
},
{
"src": ".local $x = {0 :test:select} .local $y = {1 :test:select} .match $x $y 1 1 {{1,1}} 1 * {{1,*}} * 1 {{*,1}} * * {{*,*}}",
"src": [".local $x = {0 :test:select}",
".local $y = {1 :test:select}",
".match $x $y",
"1 1 {{1,1}}",
"1 * {{1,*}}",
"* 1 {{*,1}}",
"* * {{*,*}}",
"exp": "*,1"
},
{
"src": ".local $x = {0 :test:select} .local $y = {0 :test:select} .match $x $y 1 1 {{1,1}} 1 * {{1,*}} * 1 {{*,1}} * * {{*,*}}",
"src": [".local $x = {0 :test:select}",
".local $y = {0 :test:select}",
".match $x $y",
"1 1 {{1,1}}",
"1 * {{1,*}}",
"* 1 {{*,1}}",
"* * {{*,*}}",
"exp": "*,*"
},
{
"src": ".local $x = {1 :test:select fails=select} .local $y = {1 :test:select} .match $x $y 1 1 {{1,1}} 1 * {{1,*}} * 1 {{*,1}} * * {{*,*}}",
"src": [".local $x = {1 :test:select fails=select}",
".local $y = {1 :test:select}",
".match $x $y",
"1 1 {{1,1}}",
"1 * {{1,*}}",
"* 1 {{*,1}}",
"* * {{*,*}}",
"exp": "*,1",
"expErrors": [{ "type": "bad-selector" }]
},
{
"src": ".local $x = {1 :test:select} .local $y = {1 :test:format} .match $x $y 1 1 {{1,1}} 1 * {{1,*}} * 1 {{*,1}} * * {{*,*}}",
"src": [".local $x = {1 :test:select}",
".local $y = {1 :test:format}",
".match $x $y",
"1 1 {{1,1}}",
"1 * {{1,*}}",
"* 1 {{*,1}}",
"* * {{*,*}}",
"exp": "1,*",
"expErrors": [{ "type": "bad-selector" }]
}
Expand Down

0 comments on commit 1fa6338

Please sign in to comment.