mirror of
https://github.com/less/less.js.git
synced 2026-02-10 06:55:09 -05:00
Fix error unit tests to run on any computer
This commit is contained in:
@@ -61,6 +61,7 @@ fs.readdirSync('test/less/errors').forEach(function (file) {
|
||||
fs.readFile(path.join('test/less/errors', name) + '.txt', 'utf-8', function (e, expectedErr) {
|
||||
sys.print("- error/" + name + ": ");
|
||||
expectedErr = expectedErr.replace("{path}", path.join(process.cwd(), "/test/less/errors/"))
|
||||
.replace("{pathrel}", path.join("test", "less", "errors/"))
|
||||
.replace(/\r\n/g, '\n');
|
||||
if (!err) {
|
||||
if (compiledLess) {
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
ParseError: Syntax Error on line 1 in C:\git\less.js\test\less\errors\import-no-semi.less:1:0
|
||||
ParseError: Syntax Error on line 1 in {path}import-no-semi.less:1:0
|
||||
1 @import "this-statement-is-invalid.less"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
NameError: .mixin-not-defined is undefined in test\less\errors\mixin-not-defined.less:11:0
|
||||
NameError: .mixin-not-defined is undefined in {pathrel}mixin-not-defined.less:11:0
|
||||
10
|
||||
11 .mixin-not-defined();
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
ParseError: Syntax Error on line 1 in test\less\errors\parse-error-curly-bracket.less:1:0
|
||||
ParseError: Syntax Error on line 1 in {pathrel}parse-error-curly-bracket.less:1:0
|
||||
1 }}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
NameError: .mixin-not-defined is undefined in C:\git\less.js\test\less\errors\mixin-not-defined.less:11:0
|
||||
NameError: .mixin-not-defined is undefined in {path}mixin-not-defined.less:11:0
|
||||
10
|
||||
11 .mixin-not-defined();
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
ParseError: Syntax Error on line 1 in C:\git\less.js\test\less\errors\parse-error-curly-bracket.less:1:0
|
||||
ParseError: Syntax Error on line 1 in {path}parse-error-curly-bracket.less:1:0
|
||||
1 }}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ParseError: Syntax Error on line 2 in C:\git\less.js\test\less\errors\property-ie5-hack.less:2:2
|
||||
ParseError: Syntax Error on line 2 in {path}property-ie5-hack.less:2:2
|
||||
1 .test {
|
||||
2 display/*/: block; /*sorry for IE5*/
|
||||
3 }
|
||||
|
||||
Reference in New Issue
Block a user