Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Dec 17, 2022
1 parent b50dfd1 commit 573cf5e
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
34 changes: 34 additions & 0 deletions tests/format/less/less/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1786,6 +1786,23 @@ label {
.hello {
&:extend(.input:disabled)}
// no space after unary operator, #13998
.unary_minus_single {
margin: -(@a);
}
.unary_minus_multi_1 {
margin: 0 -(@a);
}
.unary_minus_multi_2 {
margin: 0 -( @a + @b );
}
.binary_minus {
margin: 0 - (@a);
}
=====================================output=====================================
@nice-blue: #5b83ad;
@light-blue: @nice-blue + #111;
Expand Down Expand Up @@ -3427,6 +3444,23 @@ label {
&:extend(.input:disabled);
}
// no space after unary operator, #13998
.unary_minus_single {
margin: -(@a);
}
.unary_minus_multi_1 {
margin: 0 -(@a);
}
.unary_minus_multi_2 {
margin: 0 -(@a + @b);
}
.binary_minus {
margin: 0 - (@a);
}
================================================================================
`;
Expand Down
17 changes: 17 additions & 0 deletions tests/format/less/less/less.less
Original file line number Diff line number Diff line change
Expand Up @@ -1694,3 +1694,20 @@ label {
// #8177
.hello {
&:extend(.input:disabled)}

// no space after unary operator, #13998
.unary_minus_single {
margin: -(@a);
}

.unary_minus_multi_1 {
margin: 0 -(@a);
}

.unary_minus_multi_2 {
margin: 0 -( @a + @b );
}

.binary_minus {
margin: 0 - (@a);
}

0 comments on commit 573cf5e

Please sign in to comment.