mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Add note to whitespace test and add back non-character BOM test.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user