summaryrefslogtreecommitdiff
path: root/tests/test_scss.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_scss.py')
-rw-r--r--tests/test_scss.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_scss.py b/tests/test_scss.py
index f76b3e7..c1410e1 100644
--- a/tests/test_scss.py
+++ b/tests/test_scss.py
@@ -40,6 +40,9 @@ BAZ_CONTENTS = BAZ_CONTENTS.replace('@import "sub/spam";', SPAM_CONTENTS)
with open(os.path.join(settings.BASE_DIR, 'testproject', 'static', 'css', 'path_conflict.scss')) as f:
PATH_CONFLICT_CONTENTS = f.read()
+with open(os.path.join(settings.BASE_DIR, 'testproject', 'static', 'css', 'dot.file.scss')) as f:
+ DOT_FILE_CONTENTS = f.read()
+
class CompilerTestMixin(object):
def setUp(self):
@@ -103,6 +106,17 @@ class ImportTestMixin(CompilerTestMixin):
actual = self.compiler.compile_string('@import "/css/path_conflict";')
self.assertEqual(clean_css(actual), clean_css(PATH_CONFLICT_CONTENTS))
+ def test_import_dots_without_extension(self):
+ actual = self.compiler.compile_string('@import "/css/dot.file";')
+ self.assertEqual(clean_css(actual), clean_css(DOT_FILE_CONTENTS))
+
+ def test_import_dots_with_extension(self):
+ actual = self.compiler.compile_string('@import "/css/dot.file.scss";')
+ self.assertEqual(clean_css(actual), clean_css(DOT_FILE_CONTENTS))
+
+ def test_import_from_parent(self):
+ actual = self.compiler.compile_string('@import "/css/sub/from_parent";')
+ self.assertEqual(clean_css(actual), clean_css(BAZ_CONTENTS))
class FindersImportTest(ImportTestMixin, NoCollectStaticTestCase):
pass