From 31506c7ce4ba5b8a62d5ea75f2c52a3881980bd5 Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Sun, 19 Jan 2020 11:28:26 -0500 Subject: [PATCH] Add tests for default value arguments --- src/main.rs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index f7f252b..b4591cc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1135,10 +1135,25 @@ mod test_mixins { "d {\n color: red;\n}\n" ); test!( - mixin_default_value, + mixin_simple_default_value, "@mixin a($b: red) {\n color: $b;\n}\nd {\n @include a;\n}\n", "d {\n color: red;\n}\n" ); + test!( + mixin_second_value_default, + "@mixin a($a, $b: blue) {\n color: $a $b;\n}\nd {\n @include a(red);\n}\n", + "d {\n color: red blue;\n}\n" + ); + test!( + mixin_two_default_values, + "@mixin a($a: red, $b: blue) {\n color: $a $b;\n}\nd {\n @include a;\n}\n", + "d {\n color: red blue;\n}\n" + ); + test!( + mixin_override_default_value_positionally, + "@mixin a($a: red) {\n color: $a;\n}\nd {\n @include a(blue);\n}\n", + "d {\n color: blue;\n}\n" + ); } #[cfg(test)]