From 649c55ec956802fef26e819a2561ee08b7692ff5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Cie=C5=9Blak?= Date: Fri, 13 Nov 2015 23:58:46 +0000 Subject: [PATCH] Add tests for partially interpolated selectors Libsass issues: https://github.com/sass/libsass/issues/1684 https://github.com/sass/libsass/issues/1734 --- .../expected_output.css | 2 ++ .../12_double_escaped_interpolated_value_todo/input.scss | 2 ++ .../expected_output.css | 2 ++ .../22_double_escaped_interpolated_variable/input.scss | 3 +++ .../32_double_escaped_literal/expected_output.css | 2 ++ .../double_escape/32_double_escaped_literal/input.scss | 1 + .../todo_single_escape/11_escaped_interpolated_value/error | 3 +++ .../11_escaped_interpolated_value/expected_output.css | 0 .../11_escaped_interpolated_value/input.scss | 2 ++ .../todo_single_escape/11_escaped_interpolated_value/status | 1 + .../todo_single_escape/21_escaped_interpolated_variable/error | 3 +++ .../21_escaped_interpolated_variable/expected_output.css | 0 .../21_escaped_interpolated_variable/input.scss | 3 +++ .../todo_single_escape/21_escaped_interpolated_variable/status | 1 + .../44_selector/todo_single_escape/31_escaped_literal/error | 3 +++ .../todo_single_escape/31_escaped_literal/expected_output.css | 0 .../todo_single_escape/31_escaped_literal/input.scss | 1 + .../44_selector/todo_single_escape/31_escaped_literal/status | 1 + 18 files changed, 30 insertions(+) create mode 100644 spec/parser/interpolate/44_selector/double_escape/12_double_escaped_interpolated_value_todo/expected_output.css create mode 100644 spec/parser/interpolate/44_selector/double_escape/12_double_escaped_interpolated_value_todo/input.scss create mode 100644 spec/parser/interpolate/44_selector/double_escape/22_double_escaped_interpolated_variable/expected_output.css create mode 100644 spec/parser/interpolate/44_selector/double_escape/22_double_escaped_interpolated_variable/input.scss create mode 100644 spec/parser/interpolate/44_selector/double_escape/32_double_escaped_literal/expected_output.css create mode 100644 spec/parser/interpolate/44_selector/double_escape/32_double_escaped_literal/input.scss create mode 100644 spec/parser/interpolate/44_selector/todo_single_escape/11_escaped_interpolated_value/error create mode 100644 spec/parser/interpolate/44_selector/todo_single_escape/11_escaped_interpolated_value/expected_output.css create mode 100644 spec/parser/interpolate/44_selector/todo_single_escape/11_escaped_interpolated_value/input.scss create mode 100644 spec/parser/interpolate/44_selector/todo_single_escape/11_escaped_interpolated_value/status create mode 100644 spec/parser/interpolate/44_selector/todo_single_escape/21_escaped_interpolated_variable/error create mode 100644 spec/parser/interpolate/44_selector/todo_single_escape/21_escaped_interpolated_variable/expected_output.css create mode 100644 spec/parser/interpolate/44_selector/todo_single_escape/21_escaped_interpolated_variable/input.scss create mode 100644 spec/parser/interpolate/44_selector/todo_single_escape/21_escaped_interpolated_variable/status create mode 100644 spec/parser/interpolate/44_selector/todo_single_escape/31_escaped_literal/error create mode 100644 spec/parser/interpolate/44_selector/todo_single_escape/31_escaped_literal/expected_output.css create mode 100644 spec/parser/interpolate/44_selector/todo_single_escape/31_escaped_literal/input.scss create mode 100644 spec/parser/interpolate/44_selector/todo_single_escape/31_escaped_literal/status diff --git a/spec/parser/interpolate/44_selector/double_escape/12_double_escaped_interpolated_value_todo/expected_output.css b/spec/parser/interpolate/44_selector/double_escape/12_double_escaped_interpolated_value_todo/expected_output.css new file mode 100644 index 0000000000..bdb1f8a00a --- /dev/null +++ b/spec/parser/interpolate/44_selector/double_escape/12_double_escaped_interpolated_value_todo/expected_output.css @@ -0,0 +1,2 @@ +.test12\@bar { + content: '1.2'; } diff --git a/spec/parser/interpolate/44_selector/double_escape/12_double_escaped_interpolated_value_todo/input.scss b/spec/parser/interpolate/44_selector/double_escape/12_double_escaped_interpolated_value_todo/input.scss new file mode 100644 index 0000000000..b88a0db58f --- /dev/null +++ b/spec/parser/interpolate/44_selector/double_escape/12_double_escaped_interpolated_value_todo/input.scss @@ -0,0 +1,2 @@ +$key: 'bar'; +.test12#{'\\@#{$key}'} { content: '1.2'; } diff --git a/spec/parser/interpolate/44_selector/double_escape/22_double_escaped_interpolated_variable/expected_output.css b/spec/parser/interpolate/44_selector/double_escape/22_double_escaped_interpolated_variable/expected_output.css new file mode 100644 index 0000000000..dce5d096ba --- /dev/null +++ b/spec/parser/interpolate/44_selector/double_escape/22_double_escaped_interpolated_variable/expected_output.css @@ -0,0 +1,2 @@ +.test22\@bar { + content: '2.2'; } diff --git a/spec/parser/interpolate/44_selector/double_escape/22_double_escaped_interpolated_variable/input.scss b/spec/parser/interpolate/44_selector/double_escape/22_double_escaped_interpolated_variable/input.scss new file mode 100644 index 0000000000..7853842fd0 --- /dev/null +++ b/spec/parser/interpolate/44_selector/double_escape/22_double_escaped_interpolated_variable/input.scss @@ -0,0 +1,3 @@ +$key: 'bar'; +$suffix2: '\\@#{$key}'; +.test22#{$suffix2} { content: '2.2'; } diff --git a/spec/parser/interpolate/44_selector/double_escape/32_double_escaped_literal/expected_output.css b/spec/parser/interpolate/44_selector/double_escape/32_double_escaped_literal/expected_output.css new file mode 100644 index 0000000000..c14d9a5f24 --- /dev/null +++ b/spec/parser/interpolate/44_selector/double_escape/32_double_escaped_literal/expected_output.css @@ -0,0 +1,2 @@ +.test32\@baz { + content: '3.2'; } diff --git a/spec/parser/interpolate/44_selector/double_escape/32_double_escaped_literal/input.scss b/spec/parser/interpolate/44_selector/double_escape/32_double_escaped_literal/input.scss new file mode 100644 index 0000000000..a0f979aec3 --- /dev/null +++ b/spec/parser/interpolate/44_selector/double_escape/32_double_escaped_literal/input.scss @@ -0,0 +1 @@ +.test32#{'\\@baz'} { content: '3.2'; } diff --git a/spec/parser/interpolate/44_selector/todo_single_escape/11_escaped_interpolated_value/error b/spec/parser/interpolate/44_selector/todo_single_escape/11_escaped_interpolated_value/error new file mode 100644 index 0000000000..f5f2337e6a --- /dev/null +++ b/spec/parser/interpolate/44_selector/todo_single_escape/11_escaped_interpolated_value/error @@ -0,0 +1,3 @@ +Error: Invalid CSS after ".test11": expected selector, was "@bar" + on line 2 of /home/saper/sw/sass-spec/spec/parser/interpolate/44_selector/11_escaped_interpolated_value/input.scss + Use --trace for backtrace. diff --git a/spec/parser/interpolate/44_selector/todo_single_escape/11_escaped_interpolated_value/expected_output.css b/spec/parser/interpolate/44_selector/todo_single_escape/11_escaped_interpolated_value/expected_output.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/parser/interpolate/44_selector/todo_single_escape/11_escaped_interpolated_value/input.scss b/spec/parser/interpolate/44_selector/todo_single_escape/11_escaped_interpolated_value/input.scss new file mode 100644 index 0000000000..26e9167a6a --- /dev/null +++ b/spec/parser/interpolate/44_selector/todo_single_escape/11_escaped_interpolated_value/input.scss @@ -0,0 +1,2 @@ +$key: 'bar'; +.test11#{'\@#{$key}'} { content: '1.1'; } diff --git a/spec/parser/interpolate/44_selector/todo_single_escape/11_escaped_interpolated_value/status b/spec/parser/interpolate/44_selector/todo_single_escape/11_escaped_interpolated_value/status new file mode 100644 index 0000000000..b44fe09a7a --- /dev/null +++ b/spec/parser/interpolate/44_selector/todo_single_escape/11_escaped_interpolated_value/status @@ -0,0 +1 @@ +65 \ No newline at end of file diff --git a/spec/parser/interpolate/44_selector/todo_single_escape/21_escaped_interpolated_variable/error b/spec/parser/interpolate/44_selector/todo_single_escape/21_escaped_interpolated_variable/error new file mode 100644 index 0000000000..6e4c77913a --- /dev/null +++ b/spec/parser/interpolate/44_selector/todo_single_escape/21_escaped_interpolated_variable/error @@ -0,0 +1,3 @@ +Error: Invalid CSS after ".test21": expected selector, was "@bar" + on line 3 of /home/saper/sw/sass-spec/spec/parser/interpolate/44_selector/21_escaped_interpolated_variable/input.scss + Use --trace for backtrace. diff --git a/spec/parser/interpolate/44_selector/todo_single_escape/21_escaped_interpolated_variable/expected_output.css b/spec/parser/interpolate/44_selector/todo_single_escape/21_escaped_interpolated_variable/expected_output.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/parser/interpolate/44_selector/todo_single_escape/21_escaped_interpolated_variable/input.scss b/spec/parser/interpolate/44_selector/todo_single_escape/21_escaped_interpolated_variable/input.scss new file mode 100644 index 0000000000..b7833e5c54 --- /dev/null +++ b/spec/parser/interpolate/44_selector/todo_single_escape/21_escaped_interpolated_variable/input.scss @@ -0,0 +1,3 @@ +$key: 'bar'; +$suffix1: '\@#{$key}'; +.test21#{$suffix1} { content: '2.1'; } diff --git a/spec/parser/interpolate/44_selector/todo_single_escape/21_escaped_interpolated_variable/status b/spec/parser/interpolate/44_selector/todo_single_escape/21_escaped_interpolated_variable/status new file mode 100644 index 0000000000..b44fe09a7a --- /dev/null +++ b/spec/parser/interpolate/44_selector/todo_single_escape/21_escaped_interpolated_variable/status @@ -0,0 +1 @@ +65 \ No newline at end of file diff --git a/spec/parser/interpolate/44_selector/todo_single_escape/31_escaped_literal/error b/spec/parser/interpolate/44_selector/todo_single_escape/31_escaped_literal/error new file mode 100644 index 0000000000..e1d14f68ec --- /dev/null +++ b/spec/parser/interpolate/44_selector/todo_single_escape/31_escaped_literal/error @@ -0,0 +1,3 @@ +Error: Invalid CSS after ".test31": expected selector, was "@baz" + on line 1 of /home/saper/sw/sass-spec/spec/parser/interpolate/44_selector/31_escaped_literal/input.scss + Use --trace for backtrace. diff --git a/spec/parser/interpolate/44_selector/todo_single_escape/31_escaped_literal/expected_output.css b/spec/parser/interpolate/44_selector/todo_single_escape/31_escaped_literal/expected_output.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spec/parser/interpolate/44_selector/todo_single_escape/31_escaped_literal/input.scss b/spec/parser/interpolate/44_selector/todo_single_escape/31_escaped_literal/input.scss new file mode 100644 index 0000000000..c27409d30c --- /dev/null +++ b/spec/parser/interpolate/44_selector/todo_single_escape/31_escaped_literal/input.scss @@ -0,0 +1 @@ +.test31#{'\@baz'} { content: '3.1'; } diff --git a/spec/parser/interpolate/44_selector/todo_single_escape/31_escaped_literal/status b/spec/parser/interpolate/44_selector/todo_single_escape/31_escaped_literal/status new file mode 100644 index 0000000000..b44fe09a7a --- /dev/null +++ b/spec/parser/interpolate/44_selector/todo_single_escape/31_escaped_literal/status @@ -0,0 +1 @@ +65 \ No newline at end of file