Add tests for strict unit errors

This commit is contained in:
Luke Page
2013-01-31 07:06:59 +00:00
parent 3ef22f16f9
commit c27922890d
9 changed files with 24 additions and 4 deletions

View File

@@ -0,0 +1,3 @@
.a {
error: (1px + 3em);
}

View 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);

View File

@@ -0,0 +1,3 @@
.a {
error: ((1px * 2px) + (3em * 3px));
}

View 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));

View File

@@ -0,0 +1,3 @@
.a {
error: (1px / 3em);
}

View 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);

View File

@@ -0,0 +1,3 @@
.a {
error: (1px * 1em);
}

View 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);