From c183ea8c1ed022bf181c3e8173be042d1afc0e09 Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Sun, 26 Jan 2020 11:47:46 -0500 Subject: [PATCH] Test for returning variable in function and calling functions with variables as parameter --- tests/main.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/main.rs b/tests/main.rs index 664e84c..b3dbf1d 100644 --- a/tests/main.rs +++ b/tests/main.rs @@ -592,6 +592,11 @@ mod test_mixins { "@mixin a($a, $b) {\n color: $a $b;\n}\nd {\n @include a($b: blue, $a: red);\n}\n", "d {\n color: red blue;\n}\n" ); + test!( + variable_in_call_args, + "@mixin a($a) {\n color: $a;\n}\nd {\n $c: red;\n @include a($c);\n}\n", + "d {\n color: red;\n}\n" + ); } #[cfg(test)] @@ -682,6 +687,11 @@ mod test_functions { "@function a($c) {\n @return $c;\n}\n\nb {\ncolor: a(1);\n}\n", "b {\n color: 1;\n}\n" ); + test!( + return_variable, + "@function a($a) {\n @return $a;\n}\n\nb {\ncolor: a(1);\n}\n", + "b {\n color: 1;\n}\n" + ); // test!( // return_no_semicolon, // "@function a() {\n @return 1\n}\n\nb {\ncolor: a();\n}\n",