querystring.js: JSLint warnings fixed

v0.7.4-release
Jan Kassens 2010-07-18 21:09:13 +02:00 committed by Ryan Dahl
parent c7e0c64506
commit f18d9d8466
1 changed files with 11 additions and 8 deletions

View File

@ -1,5 +1,5 @@
common = require("../common"); common = require("../common");
assert = common.assert assert = common.assert;
// test using assert // test using assert
@ -107,15 +107,18 @@ qsNoMungeTestCases.forEach(function (testCase) {
}); });
// test the nested qs-in-qs case // test the nested qs-in-qs case
var f = qs.parse("a=b&q=x%3Dy%26y%3Dz"); (function(){
f.q = qs.parse(f.q); var f = qs.parse("a=b&q=x%3Dy%26y%3Dz");
assert.deepEqual(f, { a : "b", q : { x : "y", y : "z" } }); f.q = qs.parse(f.q);
assert.deepEqual(f, { a : "b", q : { x : "y", y : "z" } });
})();
// nested in colon // nested in colon
var f = qs.parse("a:b;q:x%3Ay%3By%3Az", ";", ":"); (function(){
f.q = qs.parse(f.q, ";", ":"); var f = qs.parse("a:b;q:x%3Ay%3By%3Az", ";", ":");
assert.deepEqual(f, { a : "b", q : { x : "y", y : "z" } }); f.q = qs.parse(f.q, ";", ":");
assert.deepEqual(f, { a : "b", q : { x : "y", y : "z" } });
})();
// now test stringifying // now test stringifying
assert.throws(function () { assert.throws(function () {