test error message for undefined mixin and variable

This commit is contained in:
ConnorSkees 2020-04-26 23:01:00 -04:00
parent de887daadc
commit 8ddc8ab4f4
2 changed files with 8 additions and 0 deletions

View File

@ -229,3 +229,7 @@ error!(
"a {\n @if true {\n @content;\n }\n}\n", "a {\n @if true {\n @content;\n }\n}\n",
"Error: @content is only allowed within mixin declarations." "Error: @content is only allowed within mixin declarations."
); );
error!(
undefined_mixin,
"a {@include foo;}", "Error: Undefined mixin."
);

View File

@ -135,3 +135,7 @@ test!(
); );
error!(ends_with_bang, "$a: red !;", "Error: Expected identifier."); error!(ends_with_bang, "$a: red !;", "Error: Expected identifier.");
error!(unknown_flag, "$a: red !foo;", "Error: Invalid flag name."); error!(unknown_flag, "$a: red !foo;", "Error: Invalid flag name.");
error!(
undefined_variable,
"a {color: $a;}", "Error: Undefined variable."
);