Index: test/mjsunit/regexp.js |
diff --git a/test/mjsunit/regexp.js b/test/mjsunit/regexp.js |
index 3c4f883bdc1503dcf0fcd3ac651471279176075a..76fa44be9c064ca7a8283d28c9334e2b51a860e8 100644 |
--- a/test/mjsunit/regexp.js |
+++ b/test/mjsunit/regexp.js |
@@ -127,6 +127,17 @@ assertTrue(re.test("$")); |
assertTrue(/^[Z-\c-e]*$/.test("Z[\\cde")); |
+// Test that we handle \s and \S correctly on special Unicode characters. |
+re = /\s/; |
+assertTrue(re.test("\u2028")); |
+assertTrue(re.test("\u2029")); |
+assertTrue(re.test("\uFEFF")); |
+ |
+re = /\S/; |
+assertFalse(re.test("\u2028")); |
+assertFalse(re.test("\u2029")); |
+assertFalse(re.test("\uFEFF")); |
+ |
// Test that we handle \s and \S correctly inside some bizarre |
// character classes. |
re = /[\s-:]/; |