From 9e9550262232158328ed7ccb2b620674e5015efc Mon Sep 17 00:00:00 2001 From: Laurenz Date: Thu, 30 Sep 2021 18:28:25 +0200 Subject: No hashtag before else anymore --- tests/typ/code/if.typ | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'tests/typ/code') 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] -- cgit v1.2.3