Skip to content

Commit

Permalink
quote.hrx: use one-liners (follow up to #1380)
Browse files Browse the repository at this point in the history
  • Loading branch information
glebm committed Apr 19, 2019
1 parent dc5f5d5 commit 484f27a
Showing 1 changed file with 14 additions and 25 deletions.
39 changes: 14 additions & 25 deletions spec/string_functions/quote.hrx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<===> unquoted/input.scss
a {
b: quote(c);
}
a {b: quote(c)}

<===> unquoted/output.css
a {
Expand All @@ -11,9 +9,7 @@ a {
<===>
================================================================================
<===> quoted_double/input.scss
a {
b: quote("c");
}
a {b: quote("c")}

<===> quoted_double/output.css
a {
Expand All @@ -23,9 +19,7 @@ a {
<===>
================================================================================
<===> quoted_single/input.scss
a {
b: quote('c');
}
a {b: quote('c')}

<===> quoted_single/output.css
a {
Expand All @@ -36,9 +30,7 @@ a {
================================================================================
<===> quote_unquoted_quote/single/input.scss
// See sass/libsass#2873
a {
b: quote(unquote('"'));
}
a {b: quote(unquote('"'))}

<===> quote_unquoted_quote/single/output.css
a {
Expand All @@ -49,9 +41,7 @@ a {
================================================================================
<===> quote_unquoted_quote/double/input.scss
// See sass/libsass#2873
a {
b: quote(unquote('"') + unquote("'"));
}
a {b: quote(unquote('"') + unquote("'"))}

<===> quote_unquoted_quote/double/output.css
a {
Expand All @@ -61,22 +51,21 @@ a {
<===>
================================================================================
<===> error/argument_type/input.scss
a {
b: quote((1, 2, 3));
}
a {b: quote((1, 2, 3))}

<===> error/argument_type/error
Error: $string: 1, 2, 3 is not a string.
,
2 | b: quote((1, 2, 3));
| ^^^^^^^^^^^^^^^^
1 | a {b: quote((1, 2, 3))}
| ^^^^^^^^^^^^^^^^
'
input.scss 2:6 root stylesheet
input.scss 1:7 root stylesheet

<===> error/argument_type/error-libsass
Error: argument `$string` of `quote($string)` must be a string
on line 2:6 of input.scss, in function `quote`
from line 2:6 of input.scss
>> b: quote((1, 2, 3));
on line 1:7 of input.scss, in function `quote`
from line 1:7 of input.scss
>> a {b: quote((1, 2, 3))}

------^

-----^

0 comments on commit 484f27a

Please sign in to comment.