summaryrefslogtreecommitdiff
path: root/js/src/tests/ecma_5/String/string-space-trim.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/ecma_5/String/string-space-trim.js')
-rw-r--r--js/src/tests/ecma_5/String/string-space-trim.js28
1 files changed, 27 insertions, 1 deletions
diff --git a/js/src/tests/ecma_5/String/string-space-trim.js b/js/src/tests/ecma_5/String/string-space-trim.js
index d76e2d7852..96deacda65 100644
--- a/js/src/tests/ecma_5/String/string-space-trim.js
+++ b/js/src/tests/ecma_5/String/string-space-trim.js
@@ -5,7 +5,33 @@
* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/licenses/publicdomain/
*/
-var onlySpace = String.fromCharCode(0x9, 0xa, 0xb, 0xc, 0xd, 0x20, 0xa0, 0x1680, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200a, 0x2028, 0x2029, 0x202f, 0x205f, 0x3000, 0xfeff);
+var onlySpace = String.fromCharCode(
+ 0x0009 /* <control> (CHARACTER TABULATION) */,
+ 0x000A /* <control> (LINE FEED (LF)) */,
+ 0x000B /* <control> (LINE TABULATION) */,
+ 0x000C /* <control> (FORM FEED (FF)) */,
+ 0x000D /* <control> (CARRIAGE RETURN (CR)) */,
+ 0x0020 /* SPACE */,
+ 0x00A0 /* NO-BREAK SPACE (NON-BREAKING SPACE) */,
+ 0x1680 /* OGHAM SPACE MARK */,
+ 0x2000 /* EN QUAD */,
+ 0x2001 /* EM QUAD */,
+ 0x2002 /* EN SPACE */,
+ 0x2003 /* EM SPACE */,
+ 0x2004 /* THREE-PER-EM SPACE */,
+ 0x2005 /* FOUR-PER-EM SPACE */,
+ 0x2006 /* SIX-PER-EM SPACE */,
+ 0x2007 /* FIGURE SPACE */,
+ 0x2008 /* PUNCTUATION SPACE */,
+ 0x2009 /* THIN SPACE */,
+ 0x200A /* HAIR SPACE */,
+ 0x2028 /* LINE SEPARATOR */,
+ 0x2029 /* PARAGRAPH SEPARATOR */,
+ 0x202F /* NARROW NO-BREAK SPACE */,
+ 0x205F /* MEDIUM MATHEMATICAL SPACE */,
+ 0x3000 /* IDEOGRAPHIC SPACE */,
+ 0xFEFF /* ZERO WIDTH NO-BREAK SPACE (BYTE ORDER MARK) */
+);
assertEq(onlySpace.trim(), "");
assertEq((onlySpace + 'aaaa').trim(), 'aaaa');