Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1282)

Unified Diff: test/mjsunit/harmony/regexp-property-exact-match.js

Issue 1824613002: [regexp] require exact match for unicode property names. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/mjsunit/harmony/regexp-property-exact-match.js
diff --git a/test/mjsunit/harmony/regexp-property-exact-match.js b/test/mjsunit/harmony/regexp-property-exact-match.js
new file mode 100644
index 0000000000000000000000000000000000000000..4dfcc5f96e232ff4e3ad21052a7eadeb5f7be490
--- /dev/null
+++ b/test/mjsunit/harmony/regexp-property-exact-match.js
@@ -0,0 +1,33 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-regexp-property --harmony-unicode-regexps
+
+assertThrows("/\\p{In CJK}/u");
+assertThrows("/\\p{InCJKUnifiedIdeographs}/u");
+assertDoesNotThrow("/\\p{InCJK}/u");
+assertDoesNotThrow("/\\p{InCJK_Unified_Ideographs}/u");
+
+assertDoesNotThrow("/\\p{InCyrillic_Sup}/u");
+assertDoesNotThrow("/\\p{InCyrillic_Supplement}/u");
+assertDoesNotThrow("/\\p{InCyrillic_Supplementary}/u");
+assertThrows("/\\p{InCyrillicSupplementary}/u");
+assertThrows("/\\p{InCyrillic_supplementary}/u");
+
+assertDoesNotThrow("/\\pC/u");
+assertDoesNotThrow("/\\p{Other}/u");
+assertDoesNotThrow("/\\p{Cc}/u");
+assertDoesNotThrow("/\\p{Control}/u");
+assertDoesNotThrow("/\\p{cntrl}/u");
+assertDoesNotThrow("/\\p{M}/u");
+assertDoesNotThrow("/\\p{Mark}/u");
+assertDoesNotThrow("/\\p{Combining_Mark}/u");
+assertThrows("/\\p{Combining Mark}/u");
+
+assertDoesNotThrow("/\\p{Copt}/u");
+assertDoesNotThrow("/\\p{Coptic}/u");
+assertDoesNotThrow("/\\p{Qaac}/u");
+assertDoesNotThrow("/\\p{Egyp}/u");
+assertDoesNotThrow("/\\p{Egyptian_Hieroglyphs}/u");
+assertThrows("/\\p{EgyptianHieroglyphs}/u");
« no previous file with comments | « test/mjsunit/harmony/regexp-property-blocks.js ('k') | test/mjsunit/harmony/regexp-property-general-category.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698