From 8be3fdc8d9381e0b843834ce76f8a57ea4d85551 Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Wed, 22 Apr 2020 11:37:20 -0400 Subject: [PATCH] test for nested if in functions --- tests/if.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/if.rs b/tests/if.rs index f7d3e18..06fe284 100644 --- a/tests/if.rs +++ b/tests/if.rs @@ -72,3 +72,9 @@ test!( "a {\n @if true {\n b {\n background: gray;\n }\n }\n\n @if true {\n b {\n background: gray;\n }\n }\n}\n", "a b {\n background: gray;\n}\na b {\n background: gray;\n}\n" ); +test!( + nested_if_in_function, + "@function foo($value) {\n @if true {\n @if false {\n @error foo;\n }\n\n @else {\n @return $value;\n }\n }\n} + a { color: foo(bar); }", + "a {\n color: bar;\n}\n" +);