mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -04:00
Add tests for strict unit errors
This commit is contained in:
3
test/less/errors/add-mixed-units.less
Normal file
3
test/less/errors/add-mixed-units.less
Normal file
@@ -0,0 +1,3 @@
|
||||
.a {
|
||||
error: (1px + 3em);
|
||||
}
|
||||
2
test/less/errors/add-mixed-units.txt
Normal file
2
test/less/errors/add-mixed-units.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
SyntaxError: Incompatible units. Change the units or use the unit function. Bad units: 'px' and 'em'. in {path}add-mixed-units.less:null:-1
|
||||
1 error: (1px + 3em);
|
||||
3
test/less/errors/add-mixed-units2.less
Normal file
3
test/less/errors/add-mixed-units2.less
Normal file
@@ -0,0 +1,3 @@
|
||||
.a {
|
||||
error: ((1px * 2px) + (3em * 3px));
|
||||
}
|
||||
2
test/less/errors/add-mixed-units2.txt
Normal file
2
test/less/errors/add-mixed-units2.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
SyntaxError: Incompatible units. Change the units or use the unit function. Bad units: 'px*px' and 'em*px'. in C:\git\less.js\test\less\errors\add-mixed-units2.less:null:-1
|
||||
1 error: ((1px * 2px) + (3em * 3px));
|
||||
3
test/less/errors/divide-mixed-units.less
Normal file
3
test/less/errors/divide-mixed-units.less
Normal file
@@ -0,0 +1,3 @@
|
||||
.a {
|
||||
error: (1px / 3em);
|
||||
}
|
||||
2
test/less/errors/divide-mixed-units.txt
Normal file
2
test/less/errors/divide-mixed-units.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
SyntaxError: Multiple units in dimension. Correct the units or use the unit function. Bad unit: px/em in {path}divide-mixed-units.less:null:-1
|
||||
1 error: (1px / 3em);
|
||||
3
test/less/errors/multiply-mixed-units.less
Normal file
3
test/less/errors/multiply-mixed-units.less
Normal file
@@ -0,0 +1,3 @@
|
||||
.a {
|
||||
error: (1px * 1em);
|
||||
}
|
||||
2
test/less/errors/multiply-mixed-units.txt
Normal file
2
test/less/errors/multiply-mixed-units.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
SyntaxError: Multiple units in dimension. Correct the units or use the unit function. Bad unit: em*px in {path}multiply-mixed-units.less:null:-1
|
||||
1 error: (1px * 1em);
|
||||
Reference in New Issue
Block a user