diff options
Diffstat (limited to 'tests/typ/code/while.typ')
| -rw-r--r-- | tests/typ/code/while.typ | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/tests/typ/code/while.typ b/tests/typ/code/while.typ index 306c1e45..2f0984d2 100644 --- a/tests/typ/code/while.typ +++ b/tests/typ/code/while.typ @@ -29,23 +29,16 @@ #test(type(while i < 1 [{ i += 1 }]), "template") --- -// Ref: false - // Condition must be boolean. // Error: 8-14 expected boolean, found template #while [nope] [nope] -// Make sure that we don't complain twice. -// Error: 8-15 unknown variable -#while nothing {} - -// Errors taint everything. -#let i = 0 -#test(error, while i < 10 { - i += 1 - if i < 5 [nope] else { error } -}) -#test(i, 10) +--- +// Make sure that we terminate and don't complain multiple times. +#while true { + // Error: 5-9 unknown variable + nope +} --- // Error: 7 expected expression @@ -57,11 +50,9 @@ // Error: 9 expected body #while x -// Should output `x`. // Error: 7 expected expression #while x {} -// Should output `something`. // Error: 9 expected body #while x something |
