From 8ddc8ab4f45807a3ca0aecc3d63f01804dd9df1c Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Sun, 26 Apr 2020 23:01:00 -0400 Subject: [PATCH] test error message for undefined mixin and variable --- tests/mixins.rs | 4 ++++ tests/variables.rs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/tests/mixins.rs b/tests/mixins.rs index bea25ad..c10f4bc 100644 --- a/tests/mixins.rs +++ b/tests/mixins.rs @@ -229,3 +229,7 @@ error!( "a {\n @if true {\n @content;\n }\n}\n", "Error: @content is only allowed within mixin declarations." ); +error!( + undefined_mixin, + "a {@include foo;}", "Error: Undefined mixin." +); diff --git a/tests/variables.rs b/tests/variables.rs index ede07db..fefe32e 100644 --- a/tests/variables.rs +++ b/tests/variables.rs @@ -135,3 +135,7 @@ test!( ); error!(ends_with_bang, "$a: red !;", "Error: Expected identifier."); error!(unknown_flag, "$a: red !foo;", "Error: Invalid flag name."); +error!( + undefined_variable, + "a {color: $a;}", "Error: Undefined variable." +);