Files
Matthew Dean 432286970a [Needs reviews!] Mega test refactor (#4378)
* Migrate Less to use valid CSS

* Re-organize test structure

* Lots of test refactoring

* More test updates

* Add restructured tests

* WIP

Signed-off-by: Matthew Dean <matthew-dean@users.noreply.github.com>

* More fixes to tests

* More test fixes

* All tests passing

* WIP fix tests

* Finished fixing browser tests

* Improve test coverage

* Add debug tests

* Add back debug tests to show equal test coverage

* Fix browser tests

* More test coverage

* Fix sourcemap absolute path for CI

* More source map normalization for Windows

* Fix source map normalization

* Another attempted fix for Windows

---------

Signed-off-by: Matthew Dean <matthew-dean@users.noreply.github.com>
2025-12-06 11:28:46 -08:00

72 lines
1.4 KiB
Plaintext

// String handling and interpolation tests
#strings {
background-image: url("http://son-of-a-banana.com");
quotes: "~" "~";
content: "#*%:&^,)!.(~*})";
empty: "";
brackets: "{" "}";
escapes: "\"hello\" \\world";
escapes2: "\"llo";
}
#comments {
content: "/* hello */ // not-so-secret";
}
#single-quote {
quotes: "'" "'";
content: '""#!&""';
empty: '';
semi-colon: ';';
}
#one-line { image: url(http://tooks.com) }
#crazy { image: url(http://), "}", url("http://}") }
#interpolation {
@var: '/dev';
url: "http://lesscss.org@{var}/image.jpg";
@var2: 256;
url2: "http://lesscss.org/image-@{var2}.jpg";
@var3: #456;
url3: "http://lesscss.org@{var3}";
@var4: hello;
url4: "http://lesscss.org/@{var4}";
@var5: 54.4px;
url5: "http://lesscss.org/@{var5}";
}
// multiple calls with string interpolation
.mix-mul (@a: green) {
color: ~"@{a}";
}
.mix-mul-class {
.mix-mul(blue);
.mix-mul(red);
.mix-mul(black);
.mix-mul(orange);
}
@test: Arial, Verdana, San-Serif;
.watermark {
@family: ~"Univers, @{test}";
family: @family;
}
#iterated-interpolation {
@box-small: 10px;
@box-large: 100px;
.mixin { // both ruleset and mixin
width: ~"@{box-@{suffix}}";
weird: ~"@{box}-@{suffix}}";
width-str: "@{box-@{suffix}}";
weird-str: "@{box}-@{suffix}}";
@box: ~"@{box";
@suffix: large;
}
.interpolation-mixin {
.mixin(); //call the above as mixin
}
}