From b7ce3f15405d6c950a664ba56c8216578a35caad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pontus=20=C3=96stlund?= <ponost@roxen.com> Date: Thu, 24 Nov 2016 16:38:20 +0100 Subject: [PATCH] Added the beginning of some simple tests --- simple-test/01-import_and_map/_vars.scss | 2 ++ simple-test/01-import_and_map/input.scss | 6 ++++++ simple-test/01-import_and_map/test.pike | 18 ++++++++++++++++++ simple-test/test.pike | 21 +++++++++++++++++++++ 4 files changed, 47 insertions(+) create mode 100644 simple-test/01-import_and_map/_vars.scss create mode 100644 simple-test/01-import_and_map/input.scss create mode 100644 simple-test/01-import_and_map/test.pike create mode 100644 simple-test/test.pike diff --git a/simple-test/01-import_and_map/_vars.scss b/simple-test/01-import_and_map/_vars.scss new file mode 100644 index 0000000000..a0def68dae --- /dev/null +++ b/simple-test/01-import_and_map/_vars.scss @@ -0,0 +1,2 @@ + +$link-color: magenta; diff --git a/simple-test/01-import_and_map/input.scss b/simple-test/01-import_and_map/input.scss new file mode 100644 index 0000000000..66312a89a9 --- /dev/null +++ b/simple-test/01-import_and_map/input.scss @@ -0,0 +1,6 @@ + +@import 'vars'; + +a { + color: $link-color; +} diff --git a/simple-test/01-import_and_map/test.pike b/simple-test/01-import_and_map/test.pike new file mode 100644 index 0000000000..7c128090e5 --- /dev/null +++ b/simple-test/01-import_and_map/test.pike @@ -0,0 +1,18 @@ +inherit "../test.pike"; + +constant BASE = __DIR__; + +int run() +{ + werror("Run in test: %s\n", basename(BASE)); + + compiler->set_options(([ + "source_map_file" : combine_path(BASE, "output.source.map"), + "omit_source_map" : false + ])); + + mixed err = catch { + compiler->compile_file(combine_path(BASE, "input.scss"), + combine_path(BASE, "output.css")); + }; +} diff --git a/simple-test/test.pike b/simple-test/test.pike new file mode 100644 index 0000000000..1c9d5ffd1a --- /dev/null +++ b/simple-test/test.pike @@ -0,0 +1,21 @@ + +protected Tools.Sass.SCSS compiler; + +constant BASE = __DIR__; + +int main(int argc, array(string) argv) +{ + compiler = Tools.Sass.SCSS(); + compiler->set_options(([ + "output_style" : Tools.Sass.STYLE_EXPANDED + ])); + + run(); + + return 0; +} + +int run() +{ + error("Method run() not implemented!\n"); +} -- GitLab