diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-05-18 00:36:11 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-05-18 00:36:11 +0200 |
| commit | 8b58171d7ca036d71b32749286c251cc91bdd10e (patch) | |
| tree | 4594ab5088edf8eec44f3bafe3fb8fecb13ac61b /tests/typ/code/block-invalid.typ | |
| parent | 8d67c0ca5eb3486dde97fd281bd4a51d535c600c (diff) | |
Reorganize test cases
Diffstat (limited to 'tests/typ/code/block-invalid.typ')
| -rw-r--r-- | tests/typ/code/block-invalid.typ | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/typ/code/block-invalid.typ b/tests/typ/code/block-invalid.typ new file mode 100644 index 00000000..d98bf06b --- /dev/null +++ b/tests/typ/code/block-invalid.typ @@ -0,0 +1,37 @@ +// Test invalid code block syntax. + +--- +// Multiple unseparated expressions in one line. + +// Error: 2-4 expected expression, found invalid token +{1u} + +// Should output `1`. +// Error: 3 expected semicolon or line break +{0 1} + +// Should output `2`. +// Error: 2:12 expected semicolon or line break +// Error: 1:22 expected semicolon or line break +{let x = -1 let y = 3 x + y} + +// Should output `3`. +{ + // Error: 9-12 expected identifier, found string + for "v" + + // Error: 10 expected keyword `in` + for v let z = 1 + 2 + + z +} + +--- +// Ref: false +// Error: 3:1 expected closing brace +{ + +--- +// Ref: false +// Error: 1-2 unexpected closing brace +} |
