Skip to content

Commit

Permalink
Add tests for comments in more expression-like contexts (#2000)
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 authored Jun 20, 2024
1 parent e3c74af commit e9f7340
Show file tree
Hide file tree
Showing 7 changed files with 649 additions and 31 deletions.
184 changes: 184 additions & 0 deletions spec/css/functions/special.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,187 @@ a {b: -a-calc(#{0})}
a {
b: -a-calc(0);
}

<===>
================================================================================
<===> comment/calc/after_open_paren/loud/input.scss
a {b: -a-calc(/**/ c)}

<===> comment/calc/after_open_paren/loud/output.css
a {
b: -a-calc(/**/ c);
}

<===>
================================================================================
<===> comment/calc/after_open_paren/silent/input.scss
a {
b: -a-calc(//
c);
}

<===> comment/calc/after_open_paren/silent/output.css
a {
b: -a-calc( c);
}

<===>
================================================================================
<===> comment/calc/before_close_paren/loud/input.scss
a {b: -a-calc(c /**/)}

<===> comment/calc/before_close_paren/loud/output.css
a {
b: -a-calc(c /**/);
}

<===>
================================================================================
<===> comment/calc/before_close_paren/silent/input.scss
a {
b: -a-calc(c //
);
}

<===> comment/calc/before_close_paren/silent/output.css
a {
b: -a-calc(c );
}

<===>
================================================================================
<===> comment/element/after_open_paren/loud/input.scss
a {b: element(/**/ c)}

<===> comment/element/after_open_paren/loud/output.css
a {
b: element(/**/ c);
}

<===>
================================================================================
<===> comment/element/after_open_paren/silent/input.scss
a {
b: element(//
c);
}

<===> comment/element/after_open_paren/silent/output.css
a {
b: element( c);
}

<===>
================================================================================
<===> comment/element/before_close_paren/loud/input.scss
a {b: element(c /**/)}

<===> comment/element/before_close_paren/loud/output.css
a {
b: element(c /**/);
}

<===>
================================================================================
<===> comment/element/before_close_paren/silent/input.scss
a {
b: element(c //
);
}

<===> comment/element/before_close_paren/silent/output.css
a {
b: element(c );
}

<===>
================================================================================
<===> comment/expression/after_open_paren/loud/input.scss
a {b: expression(/**/ c)}

<===> comment/expression/after_open_paren/loud/output.css
a {
b: expression(/**/ c);
}

<===>
================================================================================
<===> comment/expression/after_open_paren/silent/input.scss
a {
b: expression(//
c);
}

<===> comment/expression/after_open_paren/silent/output.css
a {
b: expression( c);
}

<===>
================================================================================
<===> comment/expression/before_close_paren/loud/input.scss
a {b: expression(c /**/)}

<===> comment/expression/before_close_paren/loud/output.css
a {
b: expression(c /**/);
}

<===>
================================================================================
<===> comment/expression/before_close_paren/silent/input.scss
a {
b: expression(c //
);
}

<===> comment/expression/before_close_paren/silent/output.css
a {
b: expression(c );
}

<===>
================================================================================
<===> comment/progid/after_open_paren/loud/input.scss
a {b: progid:c(/**/ d)}

<===> comment/progid/after_open_paren/loud/output.css
a {
b: progid:c(/**/ d);
}

<===>
================================================================================
<===> comment/progid/after_open_paren/silent/input.scss
a {
b: progid:c(//
d);
}

<===> comment/progid/after_open_paren/silent/output.css
a {
b: progid:c( d);
}

<===>
================================================================================
<===> comment/progid/before_close_paren/loud/input.scss
a {b: progid:c(d /**/)}

<===> comment/progid/before_close_paren/loud/output.css
a {
b: progid:c(d /**/);
}

<===>
================================================================================
<===> comment/progid/before_close_paren/silent/input.scss
a {
b: progid:c(d //
);
}

<===> comment/progid/before_close_paren/silent/output.css
a {
b: progid:c(d );
}
10 changes: 8 additions & 2 deletions spec/css/style_rule.hrx
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
<===> comment/after_selector/loud/input.scss
a /**/ {}
a /**/ {b: c}

<===> comment/after_selector/loud/output.css
a {
b: c;
}

<===>
================================================================================
<===> comment/after_selector/silent/input.scss
a //
{}
{b: c}

<===> comment/after_selector/silent/output.css
a {
b: c;
}

<===>
================================================================================
Expand Down
Loading

0 comments on commit e9f7340

Please sign in to comment.