Skip to content

Commit 1e3d176

Browse files
committed
Add a few new tests for leading-whitespace and duplicate-variant
1 parent 26ca17f commit 1e3d176

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

test/tests/data-model-errors.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,10 @@
180180
"type": "duplicate-variant"
181181
}
182182
]
183+
},
184+
{
185+
"src": ".match {star :string} |*| {{Literal star}} * {{The default}}",
186+
"exp": "The default"
183187
}
184188
]
185189
}

test/tests/syntax.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,18 @@
196196
"src": ".local $x = {a}{{}}",
197197
"exp": ""
198198
},
199+
{
200+
"description": "input-declaration-like content in complex-message",
201+
"src": "{{.input {$x}}}",
202+
"params": [{ "name": "x", "value": "X" }],
203+
"exp": ".input X"
204+
},
205+
{
206+
"description": "local-declaration-like content in complex-message with leading whitespace",
207+
"src": "{{ .local $x = {$y}}}",
208+
"params": [{ "name": "y", "value": "Y" }],
209+
"exp": " .local $x = Y"
210+
},
199211
{
200212
"description": "... matcher -> match-statement [s] variant -> match 1*([s] selector) variant -> match selector selector variant -> match selector selector variant key s key quoted-pattern",
201213
"src": ".match{a :f}{b :f}a b{{}}* *{{}}",

0 commit comments

Comments
 (0)