diff options
Diffstat (limited to 'tests/typ/code')
| -rw-r--r-- | tests/typ/code/break-continue.typ | 14 | ||||
| -rw-r--r-- | tests/typ/code/return.typ | 10 |
2 files changed, 24 insertions, 0 deletions
diff --git a/tests/typ/code/break-continue.typ b/tests/typ/code/break-continue.typ new file mode 100644 index 00000000..2b38cf77 --- /dev/null +++ b/tests/typ/code/break-continue.typ @@ -0,0 +1,14 @@ +// Test break and continue in loops. +// Ref: false + +--- +#for i in range(10) { + if i > 5 { + // Error: 5-10 break is not yet implemented + break + } +} + +--- +// Error: 1-10 unexpected keyword `continue` +#continue diff --git a/tests/typ/code/return.typ b/tests/typ/code/return.typ new file mode 100644 index 00000000..bd30c46f --- /dev/null +++ b/tests/typ/code/return.typ @@ -0,0 +1,10 @@ +// Test return out of functions. +// Ref: false + +--- +#let f(x) = { + // Error: 3-15 return is not yet implemented + return x + 1 +} + +#f(1) |
