From 0efe669278a5e1c3f2985eba2f3360e91159c54a Mon Sep 17 00:00:00 2001 From: Laurenz Date: Tue, 29 Nov 2022 13:37:25 +0100 Subject: Reorganize library and tests --- tests/typ/code/while.typ | 58 ------------------------------------------------ 1 file changed, 58 deletions(-) delete mode 100644 tests/typ/code/while.typ (limited to 'tests/typ/code/while.typ') diff --git a/tests/typ/code/while.typ b/tests/typ/code/while.typ deleted file mode 100644 index 5dc5ae41..00000000 --- a/tests/typ/code/while.typ +++ /dev/null @@ -1,58 +0,0 @@ -// Test while expressions. - ---- -// Should output `2 4 6 8 10`. -#let i = 0 -#while i < 10 [ - { i += 2 } - #i -] - -// Should output `Hi`. -#let iter = true -#while iter { - iter = false - "Hi." -} - -#while false { - dont-care -} - ---- -// Value of while loops. -// Ref: false - -#test(while false {}, none) - -#let i = 0 -#test(type(while i < 1 [{ i += 1 }]), "content") - ---- -// Condition must be boolean. -// Error: 8-14 expected boolean, found content -#while [nope] [nope] - ---- -// Make sure that we terminate and don't complain multiple times. -#while true { - // Error: 3-7 unknown variable - nope -} - ---- -// Error: 7 expected expression -#while - -// Error: 7 expected expression -{while} - -// Error: 9 expected body -#while x - -// Error: 7 expected expression -#while -x {} - -// Error: 9 expected body -#while x something -- cgit v1.2.3