Skip to content

Commit

Permalink
Added test case for #91 and fixed a bug. This and previous commits are
Browse files Browse the repository at this point in the history
also related to #59. Close #91
  • Loading branch information
meri committed Jan 25, 2013
1 parent 9cb5c61 commit 28d1c91
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ private Expression buildFromColorHash(HiddenTokenAwareTree token, HiddenTokenAwa
if (parsedColor==null) {
FaultyExpression faultyExpression = new FaultyExpression(token);
problemsHandler.notAColor(faultyExpression, text);
return faultyExpression;
}

return parsedColor;
Expand Down
4 changes: 4 additions & 0 deletions src/test/resources/command-line/errors.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.test h4 {
declaration: !#error#!;
padding: 2 2 2 2;
}
4 changes: 4 additions & 0 deletions src/test/resources/command-line/errorsandwarnings.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
declaration: !#error#!;
padding: 2 2 2 2;
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,4 @@
color: blue2;
border: 2px solid superred;
}

3 changes: 3 additions & 0 deletions src/test/resources/error-handling/unparseable-color.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#ugly {
color: !#error#!;
}
2 changes: 2 additions & 0 deletions src/test/resources/error-handling/unparseable-color.err
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Errors produced by compilation of testCase
ERROR 2:10 The string "#white" is not a valid color.
3 changes: 3 additions & 0 deletions src/test/resources/error-handling/unparseable-color.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#ugly {
color: #white;
}

0 comments on commit 28d1c91

Please sign in to comment.