| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Flags: --harmony-regexp-property | 5 // Flags: --harmony-regexp-property |
| 6 | 6 |
| 7 function t(re, s) { assertTrue(re.test(s)); } | 7 function t(re, s) { assertTrue(re.test(s)); } |
| 8 function f(re, s) { assertFalse(re.test(s)); } | 8 function f(re, s) { assertFalse(re.test(s)); } |
| 9 | 9 |
| 10 assertThrows("/\\p{Hiragana}/u"); | 10 assertThrows("/\\p{Hiragana}/u"); |
| 11 assertThrows("/\\p{Bidi_Class}/u"); | 11 assertThrows("/\\p{Bidi_Class}/u"); |
| 12 assertThrows("/\\p{Bidi_C=False}/u"); | 12 assertThrows("/\\p{Bidi_C=False}/u"); |
| 13 assertThrows("/\\P{Bidi_Control=Y}/u"); | 13 assertThrows("/\\P{Bidi_Control=Y}/u"); |
| 14 assertThrows("/\\p{AHex=Yes}/u"); | 14 assertThrows("/\\p{AHex=Yes}/u"); |
| 15 | 15 |
| 16 assertThrows("/\\p{Composition_Exclusion}/u"); |
| 17 assertThrows("/\\p{CE}/u"); |
| 18 assertThrows("/\\p{Full_Composition_Exclusion}/u"); |
| 19 assertThrows("/\\p{Comp_Ex}/u"); |
| 20 assertThrows("/\\p{Grapheme_Link}/u"); |
| 21 assertThrows("/\\p{Gr_Link}/u"); |
| 22 assertThrows("/\\p{Hyphen}/u"); |
| 23 assertThrows("/\\p{NFD_Inert}/u"); |
| 24 assertThrows("/\\p{NFDK_Inert}/u"); |
| 25 assertThrows("/\\p{NFC_Inert}/u"); |
| 26 assertThrows("/\\p{NFKC_Inert}/u"); |
| 27 assertThrows("/\\p{Segment_Starter}/u"); |
| 28 |
| 16 t(/\p{Alphabetic}/u, "æ"); | 29 t(/\p{Alphabetic}/u, "æ"); |
| 17 f(/\p{Alpha}/u, "1"); | 30 f(/\p{Alpha}/u, "1"); |
| 18 | 31 |
| 19 t(/\p{ASCII_Hex_Digit}/u, "f"); | 32 t(/\p{ASCII_Hex_Digit}/u, "f"); |
| 20 f(/\p{AHex}/u, "g"); | 33 f(/\p{AHex}/u, "g"); |
| 21 | 34 |
| 22 t(/\p{Bidi_Control}/u, "\u200e"); | 35 t(/\p{Bidi_Control}/u, "\u200e"); |
| 23 f(/\p{Bidi_C}/u, "g"); | 36 f(/\p{Bidi_C}/u, "g"); |
| 24 | 37 |
| 25 t(/\p{Bidi_Mirrored}/u, "("); | 38 t(/\p{Bidi_Mirrored}/u, "("); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 36 | 49 |
| 37 t(/\p{Changes_When_Lowercased}/u, "B"); | 50 t(/\p{Changes_When_Lowercased}/u, "B"); |
| 38 f(/\p{CWL}/u, "1"); | 51 f(/\p{CWL}/u, "1"); |
| 39 | 52 |
| 40 t(/\p{Changes_When_Titlecased}/u, "b"); | 53 t(/\p{Changes_When_Titlecased}/u, "b"); |
| 41 f(/\p{CWT}/u, "1"); | 54 f(/\p{CWT}/u, "1"); |
| 42 | 55 |
| 43 t(/\p{Changes_When_Uppercased}/u, "b"); | 56 t(/\p{Changes_When_Uppercased}/u, "b"); |
| 44 f(/\p{CWU}/u, "1"); | 57 f(/\p{CWU}/u, "1"); |
| 45 | 58 |
| 46 //t(/\p{Composition_Exclusion}/u, "\u0958"); | |
| 47 //f(/\p{CE}/u, "1"); | |
| 48 | |
| 49 t(/\p{Dash}/u, "-"); | 59 t(/\p{Dash}/u, "-"); |
| 50 f(/\p{Dash}/u, "1"); | 60 f(/\p{Dash}/u, "1"); |
| 51 | 61 |
| 52 t(/\p{Default_Ignorable_Code_Point}/u, "\u00ad"); | 62 t(/\p{Default_Ignorable_Code_Point}/u, "\u00ad"); |
| 53 f(/\p{DI}/u, "1"); | 63 f(/\p{DI}/u, "1"); |
| 54 | 64 |
| 55 t(/\p{Deprecated}/u, "\u17a3"); | 65 t(/\p{Deprecated}/u, "\u17a3"); |
| 56 f(/\p{Dep}/u, "1"); | 66 f(/\p{Dep}/u, "1"); |
| 57 | 67 |
| 58 t(/\p{Diacritic}/u, "\u0301"); | 68 t(/\p{Diacritic}/u, "\u0301"); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 69 | 79 |
| 70 t(/\p{Emoji_Modifier}/u, "\u{1F3FE}"); | 80 t(/\p{Emoji_Modifier}/u, "\u{1F3FE}"); |
| 71 f(/\p{Emoji_Modifier}/u, "x"); | 81 f(/\p{Emoji_Modifier}/u, "x"); |
| 72 | 82 |
| 73 t(/\p{Emoji_Presentation}/u, "\u{1F308}"); | 83 t(/\p{Emoji_Presentation}/u, "\u{1F308}"); |
| 74 f(/\p{Emoji_Presentation}/u, "x"); | 84 f(/\p{Emoji_Presentation}/u, "x"); |
| 75 | 85 |
| 76 t(/\p{Extender}/u, "\u3005"); | 86 t(/\p{Extender}/u, "\u3005"); |
| 77 f(/\p{Ext}/u, "x"); | 87 f(/\p{Ext}/u, "x"); |
| 78 | 88 |
| 79 t(/\p{Full_Composition_Exclusion}/u, "\uFB1F"); | |
| 80 f(/\p{Comp_Ex}/u, "x"); | |
| 81 | |
| 82 t(/\p{Grapheme_Base}/u, " "); | 89 t(/\p{Grapheme_Base}/u, " "); |
| 83 f(/\p{Gr_Base}/u, "\u0010"); | 90 f(/\p{Gr_Base}/u, "\u0010"); |
| 84 | 91 |
| 85 t(/\p{Grapheme_Extend}/u, "\u0300"); | 92 t(/\p{Grapheme_Extend}/u, "\u0300"); |
| 86 f(/\p{Gr_Ext}/u, "x"); | 93 f(/\p{Gr_Ext}/u, "x"); |
| 87 | 94 |
| 88 t(/\p{Hex_Digit}/u, "a"); | 95 t(/\p{Hex_Digit}/u, "a"); |
| 89 f(/\p{Hex}/u, "g"); | 96 f(/\p{Hex}/u, "g"); |
| 90 | 97 |
| 91 t(/\p{ID_Continue}/u, "1"); | 98 t(/\p{ID_Continue}/u, "1"); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 117 | 124 |
| 118 t(/\p{Noncharacter_Code_Point}/u, "\uFDD0"); | 125 t(/\p{Noncharacter_Code_Point}/u, "\uFDD0"); |
| 119 f(/\p{NChar}/u, "A"); | 126 f(/\p{NChar}/u, "A"); |
| 120 | 127 |
| 121 t(/\p{Pattern_Syntax}/u, "\u0021"); | 128 t(/\p{Pattern_Syntax}/u, "\u0021"); |
| 122 f(/\p{NChar}/u, "A"); | 129 f(/\p{NChar}/u, "A"); |
| 123 | 130 |
| 124 t(/\p{Pattern_White_Space}/u, "\u0009"); | 131 t(/\p{Pattern_White_Space}/u, "\u0009"); |
| 125 f(/\p{Pat_Syn}/u, "A"); | 132 f(/\p{Pat_Syn}/u, "A"); |
| 126 | 133 |
| 127 // t(/\p{Prepended_Concatenation_Mark}/u, "\uFDD0"); | |
| 128 // f(/\p{PCM}/u, "A"); | |
| 129 | |
| 130 t(/\p{Quotation_Mark}/u, "'"); | 134 t(/\p{Quotation_Mark}/u, "'"); |
| 131 f(/\p{QMark}/u, "A"); | 135 f(/\p{QMark}/u, "A"); |
| 132 | 136 |
| 133 t(/\p{Radical}/u, "\u2FAD"); | 137 t(/\p{Radical}/u, "\u2FAD"); |
| 134 f(/\p{Radical}/u, "A"); | 138 f(/\p{Radical}/u, "A"); |
| 135 | 139 |
| 136 t(/\p{Sentence_Terminal}/u, "!"); | 140 t(/\p{Sentence_Terminal}/u, "!"); |
| 137 f(/\p{STerm}/u, "A"); | 141 f(/\p{STerm}/u, "A"); |
| 138 | 142 |
| 139 t(/\p{Soft_Dotted}/u, "i"); | 143 t(/\p{Soft_Dotted}/u, "i"); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 152 f(/\p{VS}/u, "A"); | 156 f(/\p{VS}/u, "A"); |
| 153 | 157 |
| 154 t(/\p{White_Space}/u, " "); | 158 t(/\p{White_Space}/u, " "); |
| 155 f(/\p{WSpace}/u, "A"); | 159 f(/\p{WSpace}/u, "A"); |
| 156 | 160 |
| 157 t(/\p{XID_Continue}/u, "1"); | 161 t(/\p{XID_Continue}/u, "1"); |
| 158 f(/\p{XIDC}/u, " "); | 162 f(/\p{XIDC}/u, " "); |
| 159 | 163 |
| 160 t(/\p{XID_Start}/u, "A"); | 164 t(/\p{XID_Start}/u, "A"); |
| 161 f(/\p{XIDS}/u, " "); | 165 f(/\p{XIDS}/u, " "); |
| OLD | NEW |