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/text | |
| parent | 8d67c0ca5eb3486dde97fd281bd4a51d535c600c (diff) | |
Reorganize test cases
Diffstat (limited to 'tests/typ/text')
| -rw-r--r-- | tests/typ/text/whitespace.typ | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/typ/text/whitespace.typ b/tests/typ/text/whitespace.typ index 3d7dd2e2..418c3a12 100644 --- a/tests/typ/text/whitespace.typ +++ b/tests/typ/text/whitespace.typ @@ -1,6 +1,40 @@ // Test whitespace handling. --- +// Spacing around let. + +// Error: 6 expected identifier +A#let;B \ +A#let x = 1;B #test(x, 1) \ +A #let x = 2;B #test(x, 2) \ +A#let x = 3; B #test(x, 3) + +--- +// Spacing around if-else. + +A#if true [B]C \ +A#if true [B] C \ +A #if true{"B"}C \ +A #if true{"B"} C \ +A#if false [] #else [B]C \ +A#if true [B] #else [] C + +--- +// Spacing around while loop. + +#let c = true; A#while c [{c = false}B]C \ +#let c = true; A#while c [{c = false}B] C \ +#let c = true; A #while c { c = false; "B" }C \ +#let c = true; A #while c { c = false; "B" } C + +--- +// Spacing around for loop. + +A#for _ in (none,) [B]C \ +A#for _ in (none,) [B] C \ +A #for _ in (none,) {"B"}C + +--- // Test that a run consisting only of whitespace isn't trimmed. A#font("PT Sans")[ ]B |
