From 8b58171d7ca036d71b32749286c251cc91bdd10e Mon Sep 17 00:00:00 2001 From: Laurenz Date: Tue, 18 May 2021 00:36:11 +0200 Subject: Reorganize test cases --- tests/typ/control/while.typ | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 tests/typ/control/while.typ (limited to 'tests/typ/control/while.typ') diff --git a/tests/typ/control/while.typ b/tests/typ/control/while.typ deleted file mode 100644 index acf7951e..00000000 --- a/tests/typ/control/while.typ +++ /dev/null @@ -1,43 +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(type(while false {}), "template") -#test(type(while false []), "template") - ---- -// 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 {} - -// A single error stops iteration. -#let i = 0 -#test(error, while i < 10 { - i += 1 - if i < 5 [nope] else { error } -}) -#test(i, 5) -- cgit v1.2.3