blob: 0d1f70459ef9b745b05a22efaba44897dac15255 [file] [log] [blame]
Ben Murdochda12d292016-06-02 14:46:10 +01001// Copyright 2016 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Ben Murdoch61f157c2016-09-16 13:49:30 +01005// Flags: --harmony-regexp-property
Ben Murdochda12d292016-06-02 14:46:10 +01006
7assertThrows("/\\p{In CJK}/u");
8assertThrows("/\\p{InCJKUnifiedIdeographs}/u");
Ben Murdochc5610432016-08-08 18:44:38 +01009assertThrows("/\\p{InCJK}/u");
10assertThrows("/\\p{InCJK_Unified_Ideographs}/u");
Ben Murdochda12d292016-06-02 14:46:10 +010011
Ben Murdochc5610432016-08-08 18:44:38 +010012assertThrows("/\\p{InCyrillic_Sup}/u");
13assertThrows("/\\p{InCyrillic_Supplement}/u");
14assertThrows("/\\p{InCyrillic_Supplementary}/u");
Ben Murdochda12d292016-06-02 14:46:10 +010015assertThrows("/\\p{InCyrillicSupplementary}/u");
16assertThrows("/\\p{InCyrillic_supplementary}/u");
17
Ben Murdoch61f157c2016-09-16 13:49:30 +010018assertDoesNotThrow("/\\p{C}/u");
Ben Murdochda12d292016-06-02 14:46:10 +010019assertDoesNotThrow("/\\p{Other}/u");
20assertDoesNotThrow("/\\p{Cc}/u");
21assertDoesNotThrow("/\\p{Control}/u");
22assertDoesNotThrow("/\\p{cntrl}/u");
23assertDoesNotThrow("/\\p{M}/u");
24assertDoesNotThrow("/\\p{Mark}/u");
25assertDoesNotThrow("/\\p{Combining_Mark}/u");
26assertThrows("/\\p{Combining Mark}/u");
27
Ben Murdochc5610432016-08-08 18:44:38 +010028assertDoesNotThrow("/\\p{Script=Copt}/u");
29assertThrows("/\\p{Coptic}/u");
30assertThrows("/\\p{Qaac}/u");
31assertThrows("/\\p{Egyp}/u");
32assertDoesNotThrow("/\\p{Script=Egyptian_Hieroglyphs}/u");
Ben Murdochda12d292016-06-02 14:46:10 +010033assertThrows("/\\p{EgyptianHieroglyphs}/u");
Ben Murdochc5610432016-08-08 18:44:38 +010034
35assertThrows("/\\p{BidiClass=LeftToRight}/u");
36assertThrows("/\\p{BidiC=LeftToRight}/u");
37assertThrows("/\\p{bidi_c=Left_To_Right}/u");
38
39assertDoesNotThrow("/\\p{Block=CJK}/u");
40assertThrows("/\\p{Block = CJK}/u");
41assertThrows("/\\p{Block=cjk}/u");
42assertThrows("/\\p{BLK=CJK}/u");