Test for returning variable in function and calling functions with variables as parameter
This commit is contained in:
parent
65030eb7ea
commit
c183ea8c1e
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user