Add note to whitespace test and add back non-character BOM test.

This commit is contained in:
John-David Dalton
2014-10-03 23:44:54 -07:00
parent 10c7e49273
commit 22cf82e44b

View File

@@ -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);