Skip to content

Commit

Permalink
Add a few new tests for leading-whitespace and duplicate-variant
Browse files Browse the repository at this point in the history
  • Loading branch information
eemeli committed Aug 20, 2024
1 parent 26ca17f commit 1e3d176
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/tests/data-model-errors.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@
"type": "duplicate-variant"
}
]
},
{
"src": ".match {star :string} |*| {{Literal star}} * {{The default}}",
"exp": "The default"
}
]
}
12 changes: 12 additions & 0 deletions test/tests/syntax.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,18 @@
"src": ".local $x = {a}{{}}",
"exp": ""
},
{
"description": "input-declaration-like content in complex-message",
"src": "{{.input {$x}}}",
"params": [{ "name": "x", "value": "X" }],
"exp": ".input X"
},
{
"description": "local-declaration-like content in complex-message with leading whitespace",
"src": "{{ .local $x = {$y}}}",
"params": [{ "name": "y", "value": "Y" }],
"exp": " .local $x = Y"
},
{
"description": "... matcher -> match-statement [s] variant -> match 1*([s] selector) variant -> match selector selector variant -> match selector selector variant key s key quoted-pattern",
"src": ".match{a :f}{b :f}a b{{}}* *{{}}",
Expand Down

0 comments on commit 1e3d176

Please sign in to comment.