Skip to content

Commit

Permalink
Add test for compatibility with renamed JSLint options
Browse files Browse the repository at this point in the history
Create jslintRenamed.js unit test which tests handling of the
"/*jslint" eqeq option.  If the option name is not converted from "eqeq"
to "eqeqeq" and the value inverted, the test will fail.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
  • Loading branch information
kevinoid authored and valueof committed Apr 7, 2012
1 parent c788615 commit 03596ac
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/unit/core.js
Expand Up @@ -242,6 +242,13 @@ exports.jslintInverted = function () {
TestRun().test(src);
};

exports.jslintRenamed = function () {
var src = fs.readFileSync(__dirname + '/fixtures/jslintRenamed.js', 'utf8');
TestRun()
.addError(4, "Expected '===' and instead saw '=='.")
.test(src);
};

exports.caseExpressions = function () {
var src = fs.readFileSync(__dirname + '/fixtures/caseExpressions.js', 'utf8');
TestRun()
Expand Down
5 changes: 5 additions & 0 deletions tests/unit/fixtures/jslintRenamed.js
@@ -0,0 +1,5 @@
/*jslint eqeq: false */

var i, j;
if (i == j) {
}

0 comments on commit 03596ac

Please sign in to comment.