diff options
author | cjihrig <cjihrig@gmail.com> | 2014-07-19 01:27:34 -0400 |
---|---|---|
committer | Fedor Indutny <fedor@indutny.com> | 2014-07-24 00:41:51 +0400 |
commit | 61ddad1314824ac32bb2eadd88c44df53ab4792c (patch) | |
tree | 356636d292fb34a68329d0e01e243965506322a5 /test | |
parent | e1ce8ba639b5591675a43859697b00b9134e30ec (diff) | |
download | android-node-v8-61ddad1314824ac32bb2eadd88c44df53ab4792c.tar.gz android-node-v8-61ddad1314824ac32bb2eadd88c44df53ab4792c.tar.bz2 android-node-v8-61ddad1314824ac32bb2eadd88c44df53ab4792c.zip |
querystring: do not add sep for empty array
Currently, stringification of an empty array outputs a single
separator character. This commit causes an empty array to output
the empty string.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/simple/test-querystring.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/simple/test-querystring.js b/test/simple/test-querystring.js index 3cee8081b5..c6390d7de7 100644 --- a/test/simple/test-querystring.js +++ b/test/simple/test-querystring.js @@ -57,7 +57,9 @@ var qsTestCases = [ valueOf: 'bar', __defineGetter__: 'baz' }], // See: https://github.com/joyent/node/issues/3058 - ['foo&bar=baz', 'foo=&bar=baz', { foo: '', bar: 'baz' }] + ['foo&bar=baz', 'foo=&bar=baz', { foo: '', bar: 'baz' }], + [null, '', {}], + [undefined, '', {}] ]; // [ wonkyQS, canonicalQS, obj ] @@ -87,7 +89,8 @@ var qsWeirdObjects = [ [{f: false, t: true}, 'f=false&t=true', {'f': 'false', 't': 'true'}], [{n: null}, 'n=', {'n': ''}], [{nan: NaN}, 'nan=', {'nan': ''}], - [{inf: Infinity}, 'inf=', {'inf': ''}] + [{inf: Infinity}, 'inf=', {'inf': ''}], + [{a: [], b: []}, '', {}] ]; // }}} |