File tree Expand file tree Collapse file tree
src/test/java/org/htmlunit/javascript/regexp Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -111,7 +111,6 @@ public void validationPatternUnicodePropertyEscapeUppercaseLetter() throws Excep
111111 validation ("\\ p{uppercaseletter}*" , "МЙР" );
112112 }
113113
114-
115114 /**
116115 * @throws Exception if an error occurs
117116 */
@@ -122,6 +121,16 @@ public void validationPatternUnicodePropertyEscapeLowercaseLetter() throws Excep
122121 validation ("\\ p{Ll}*" , "мйр" );
123122 }
124123
124+ /**
125+ * @throws Exception if an error occurs
126+ */
127+ @ Test
128+ @ Alerts ("false" )
129+ public void validationPatternUnicodePropertyEscapePrivateUse () throws Exception {
130+ validation ("[^\\ p{gc=Co}\\ p{gc=Cn}]+" , "" );
131+ validation ("[^\\ p{gc=Co}\\ p{gc=Cn}]+" , "׽" );
132+ }
133+
125134 private void validation (final String pattern , final String value ) throws Exception {
126135 final String html =
127136 "<html><head>\n "
Original file line number Diff line number Diff line change @@ -397,6 +397,8 @@ public void unicodePropertyEscapes() {
397397 assertEquals ("\\ p{Lu}0-9" , regExpJsToJavaConverter .convert ("\\ p{Lu}0-9" ));
398398 assertEquals ("\\ p{Ll}0-9" , regExpJsToJavaConverter .convert ("\\ p{Ll}0-9" ));
399399
400+ assertEquals ("[^\\ p{gc=Co}\\ p{gc=Cn}]+" , regExpJsToJavaConverter .convert ("[^\\ p{gc=Co}\\ p{gc=Cn}]+" ));
401+
400402 // assertEquals("p\\{html\\}0-9", regExpJsToJavaConverter.convert("\\p{html}0-9"));
401403 }
402404}
You can’t perform that action at this time.
0 commit comments