diff --git a/test/test.js b/test/test.js index 200cf54f7..037383d8a 100644 --- a/test/test.js +++ b/test/test.js @@ -277,7 +277,10 @@ 'Uint32Array' ]; - /** Used to check for problems removing whitespace */ + /** + * Used to check for problems removing whitespace. For a whitespace reference + * see V8's unit test https://code.google.com/p/v8/source/browse/branches/bleeding_edge/test/mjsunit/whitespaces.js. + */ var whitespace = ' \t\x0B\f\xA0\ufeff\n\r\u2028\u2029\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000'; /** @@ -11411,7 +11414,8 @@ }); test('`_.' + methodName + '` should not remove non-whitespace characters', 1, function() { - var problemChars = '\x85\u200b', + // zero-width space (zws), next line character (nel), and non-character (bom) are not whitespace + var problemChars = '\x85\u200b\ufffe', string = problemChars + 'a b c' + problemChars; strictEqual(func(string), string);