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 | |
| parent | 8d67c0ca5eb3486dde97fd281bd4a51d535c600c (diff) | |
Reorganize test cases
Diffstat (limited to 'tests/typ')
| -rw-r--r-- | tests/typ/code/array.typ (renamed from tests/typ/expr/array.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/code/assoc.typ (renamed from tests/typ/expr/assoc.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/code/block-invalid.typ (renamed from tests/typ/expr/block-invalid.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/code/block-scoping.typ (renamed from tests/typ/expr/block-scoping.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/code/block.typ (renamed from tests/typ/expr/block.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/code/call-invalid.typ (renamed from tests/typ/expr/call-invalid.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/code/call.typ (renamed from tests/typ/expr/call.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/code/closure.typ (renamed from tests/typ/expr/closure.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/code/comment.typ (renamed from tests/typ/comment.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/code/dict.typ (renamed from tests/typ/expr/dict.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/code/for-pattern.typ (renamed from tests/typ/control/for-pattern.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/code/for.typ (renamed from tests/typ/control/for.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/code/if.typ (renamed from tests/typ/control/if.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/code/invalid.typ (renamed from tests/typ/control/invalid.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/code/let.typ (renamed from tests/typ/control/let.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/code/ops-invalid.typ (renamed from tests/typ/expr/ops-invalid.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/code/ops.typ (renamed from tests/typ/expr/ops.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/code/prec.typ (renamed from tests/typ/expr/prec.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/code/repr.typ (renamed from tests/typ/repr.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/code/while.typ (renamed from tests/typ/control/while.typ) | 0 | ||||
| -rw-r--r-- | tests/typ/layout/fixed.typ (renamed from tests/typ/expand.typ) | 2 | ||||
| -rw-r--r-- | tests/typ/spacing.typ | 35 | ||||
| -rw-r--r-- | tests/typ/text/whitespace.typ | 34 |
23 files changed, 35 insertions, 36 deletions
diff --git a/tests/typ/expr/array.typ b/tests/typ/code/array.typ index c9383501..c9383501 100644 --- a/tests/typ/expr/array.typ +++ b/tests/typ/code/array.typ diff --git a/tests/typ/expr/assoc.typ b/tests/typ/code/assoc.typ index 19c56951..19c56951 100644 --- a/tests/typ/expr/assoc.typ +++ b/tests/typ/code/assoc.typ diff --git a/tests/typ/expr/block-invalid.typ b/tests/typ/code/block-invalid.typ index d98bf06b..d98bf06b 100644 --- a/tests/typ/expr/block-invalid.typ +++ b/tests/typ/code/block-invalid.typ diff --git a/tests/typ/expr/block-scoping.typ b/tests/typ/code/block-scoping.typ index 7bb98969..7bb98969 100644 --- a/tests/typ/expr/block-scoping.typ +++ b/tests/typ/code/block-scoping.typ diff --git a/tests/typ/expr/block.typ b/tests/typ/code/block.typ index 196e6c14..196e6c14 100644 --- a/tests/typ/expr/block.typ +++ b/tests/typ/code/block.typ diff --git a/tests/typ/expr/call-invalid.typ b/tests/typ/code/call-invalid.typ index 0ed5246f..0ed5246f 100644 --- a/tests/typ/expr/call-invalid.typ +++ b/tests/typ/code/call-invalid.typ diff --git a/tests/typ/expr/call.typ b/tests/typ/code/call.typ index dcf11806..dcf11806 100644 --- a/tests/typ/expr/call.typ +++ b/tests/typ/code/call.typ diff --git a/tests/typ/expr/closure.typ b/tests/typ/code/closure.typ index 86a6f632..86a6f632 100644 --- a/tests/typ/expr/closure.typ +++ b/tests/typ/code/closure.typ diff --git a/tests/typ/comment.typ b/tests/typ/code/comment.typ index 25180211..25180211 100644 --- a/tests/typ/comment.typ +++ b/tests/typ/code/comment.typ diff --git a/tests/typ/expr/dict.typ b/tests/typ/code/dict.typ index 655a3299..655a3299 100644 --- a/tests/typ/expr/dict.typ +++ b/tests/typ/code/dict.typ diff --git a/tests/typ/control/for-pattern.typ b/tests/typ/code/for-pattern.typ index a6a7c16a..a6a7c16a 100644 --- a/tests/typ/control/for-pattern.typ +++ b/tests/typ/code/for-pattern.typ diff --git a/tests/typ/control/for.typ b/tests/typ/code/for.typ index bca1af46..bca1af46 100644 --- a/tests/typ/control/for.typ +++ b/tests/typ/code/for.typ diff --git a/tests/typ/control/if.typ b/tests/typ/code/if.typ index 8d07e9b8..8d07e9b8 100644 --- a/tests/typ/control/if.typ +++ b/tests/typ/code/if.typ diff --git a/tests/typ/control/invalid.typ b/tests/typ/code/invalid.typ index 49158a68..49158a68 100644 --- a/tests/typ/control/invalid.typ +++ b/tests/typ/code/invalid.typ diff --git a/tests/typ/control/let.typ b/tests/typ/code/let.typ index 4f84aa67..4f84aa67 100644 --- a/tests/typ/control/let.typ +++ b/tests/typ/code/let.typ diff --git a/tests/typ/expr/ops-invalid.typ b/tests/typ/code/ops-invalid.typ index 12d2a2c3..12d2a2c3 100644 --- a/tests/typ/expr/ops-invalid.typ +++ b/tests/typ/code/ops-invalid.typ diff --git a/tests/typ/expr/ops.typ b/tests/typ/code/ops.typ index ef249c43..ef249c43 100644 --- a/tests/typ/expr/ops.typ +++ b/tests/typ/code/ops.typ diff --git a/tests/typ/expr/prec.typ b/tests/typ/code/prec.typ index e64e583c..e64e583c 100644 --- a/tests/typ/expr/prec.typ +++ b/tests/typ/code/prec.typ diff --git a/tests/typ/repr.typ b/tests/typ/code/repr.typ index f2404510..f2404510 100644 --- a/tests/typ/repr.typ +++ b/tests/typ/code/repr.typ diff --git a/tests/typ/control/while.typ b/tests/typ/code/while.typ index acf7951e..acf7951e 100644 --- a/tests/typ/control/while.typ +++ b/tests/typ/code/while.typ diff --git a/tests/typ/expand.typ b/tests/typ/layout/fixed.typ index 8b858a4e..bcb88fe1 100644 --- a/tests/typ/expand.typ +++ b/tests/typ/layout/fixed.typ @@ -1,4 +1,4 @@ -// Test fit/fill expansion. +// Test shrink-to-fit vs fixed. --- #let right(body) = align(right, body) diff --git a/tests/typ/spacing.typ b/tests/typ/spacing.typ deleted file mode 100644 index bb86a59c..00000000 --- a/tests/typ/spacing.typ +++ /dev/null @@ -1,35 +0,0 @@ -// Test spacing around control flow structures. - ---- -// 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 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 |
