Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

fix a typo #31

Merged
merged 1 commit into from

2 participants

@nzakas nzakas merged commit 832c9cb into CSSLint:master

1 check passed

Details default The Travis build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 10, 2012
  1. @nightwing

    fix typo

    nightwing authored
This page is out of date. Refresh to see the latest.
Showing with 17 additions and 1 deletion.
  1. +1 −1  src/css/Parser.js
  2. +16 −0 tests/css/Parser.js
View
2  src/css/Parser.js
@@ -945,7 +945,7 @@ Parser.prototype = function(){
//there must be a next selector
if (nextSelector === null){
- this._unexpectedToken(this.LT(1));
+ this._unexpectedToken(tokenStream.LT(1));
} else {
//nextSelector is an instance of SelectorPart
View
16 tests/css/Parser.js
@@ -1548,6 +1548,22 @@
var result = parser.parse(".foo {\n; color: #fff;\n}");
}
}));
+
+ suite.add(new YUITest.TestCase({
+
+ name: "Invalid CSS Parsing Tests",
+
+ "Test parsing invalid celector": function(){
+ var error;
+ var parser = new Parser();
+ parser.addListener("error", function(e){error = e});
+ parser.parse("c++{}");
+
+ Assert.areEqual("error", error.type);
+ Assert.areEqual(1, error.line);
+ Assert.areEqual(3, error.col);
+ }
+ }));
YUITest.TestRunner.add(suite);
Something went wrong with that request. Please try again.