From f88c22f360f8e83abd8d422e97813d0dedd80fa6 Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Fri, 24 Apr 2020 20:30:14 -0400 Subject: [PATCH] test for chained imports --- tests/imports.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/imports.rs b/tests/imports.rs index 605c6db..88dcbf2 100644 --- a/tests/imports.rs +++ b/tests/imports.rs @@ -87,3 +87,15 @@ fn finds_underscore_name_scss() { &StyleSheet::new(input.to_string()).expect(input) ); } + +#[test] +fn chained_imports() { + let input = "@import \"chained_imports__a\";\na {\n color: $a;\n}"; + tempfile!("chained_imports__a.scss", "@import \"chained_imports__b\";"); + tempfile!("chained_imports__b.scss", "@import \"chained_imports__c\";"); + tempfile!("chained_imports__c.scss", "$a: red;"); + assert_eq!( + "a {\n color: red;\n}\n", + &StyleSheet::new(input.to_string()).expect(input) + ); +}