diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-09-30 18:28:25 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-09-30 18:28:25 +0200 |
| commit | 9e9550262232158328ed7ccb2b620674e5015efc (patch) | |
| tree | 810a8898d218452855969be74456a1fdefdb27b2 /tests | |
| parent | 989d344d3dc2e08ec2ed5025b202e464a5b29d2c (diff) | |
No hashtag before else anymore
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/typ/code/if.typ | 14 | ||||
| -rw-r--r-- | tests/typ/text/whitespace.typ | 4 |
2 files changed, 11 insertions, 7 deletions
diff --git a/tests/typ/code/if.typ b/tests/typ/code/if.typ index 174e6978..36fd3d0f 100644 --- a/tests/typ/code/if.typ +++ b/tests/typ/code/if.typ @@ -27,14 +27,14 @@ == 1 ) [ Nope. -] #else { +] else { "Three." } // Multiline. #if false [ Bad. -] #else { +] else { let point = "." "Four" + point } @@ -71,7 +71,7 @@ // Condition must be boolean. // If it isn't, neither branch is evaluated. // Error: 5-14 expected boolean, found string -#if "a" + "b" { nope } #else { nope } +#if "a" + "b" { nope } else { nope } --- // Make sure that we don't complain twice. @@ -101,5 +101,9 @@ x {} #if x something // Should output `A thing.` -// Error: 20 expected body -A#if false {} #else thing +// Error: 19 expected body +A#if false {} else thing + +#if a []else [b] +#if a [] else [b] +#if a {} else [b] diff --git a/tests/typ/text/whitespace.typ b/tests/typ/text/whitespace.typ index 7d5b1a68..aefdab34 100644 --- a/tests/typ/text/whitespace.typ +++ b/tests/typ/text/whitespace.typ @@ -12,8 +12,8 @@ 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 +A#if false [] else [B]C \ +A#if true [B] else [] C --- // Spacing around while loop. |
