Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[string-trimming] Fix whitespace tests #1399

Merged
merged 1 commit into from
Jan 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[string-trimming] Fix whitespace tests
This patch fixes a typo (`\FEFF` → `\uFEFF`) and adds some missing whitespace symbols as a follow-up to #1246.
  • Loading branch information
mathiasbynens committed Jan 25, 2018
commit 2ac6ef67bea33ef2173de40fce4401dfd8d8fbb4
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ features: [string-trimming, String.prototype.trimEnd]
var trimEnd = String.prototype.trimEnd;

// A string of all valid WhiteSpace Unicode code points
var wspc = '\u0009\u000B\u000C\u0020\u00A0\FEFF\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000';
var wspc = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';

var str = wspc + 'a' + wspc + 'b' + wspc;
var expected = wspc + 'a' + wspc + 'b';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ features: [string-trimming, String.prototype.trimStart]
var trimStart = String.prototype.trimStart;

// A string of all valid WhiteSpace Unicode code points
var wspc = '\u0009\u000B\u000C\u0020\u00A0\FEFF\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000';
var wspc = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';

var str = wspc + 'a' + wspc + 'b' + wspc;
var expected = 'a' + wspc + 'b' + wspc;
Expand Down