Skip to content

Commit f7bb903

Browse files
committed
document last changes, cleanup tests, add two more real browser tests
1 parent ed213e9 commit f7bb903

3 files changed

Lines changed: 85 additions & 170 deletions

File tree

src/changes/changes.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
INCOMPATIBLE CHANGE: CookieManager.getPort(URL) removed. Looks like
1313
<a href="http://code.google.com/p/googleappengine/issues/detail?id=4784"> is solved.
1414
</action>
15+
<action type="fix" dev="Lai Quang Duong">
16+
Regexp "[^]" and "[^]" break translation of later char rangen in the regex.
17+
</action>
1518
<action type="add" dev="rbri" issue="573">
1619
window.isSecureContext added.
1720
</action>

src/test/java/org/htmlunit/javascript/regexp/HtmlUnitRegExpProxyTest.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,6 +1151,26 @@ public void specialBrackets7() throws Exception {
11511151
testEvaluate("'ab]cd'.replace(/[^]]/g, 'x')");
11521152
}
11531153

1154+
/**
1155+
* @throws Exception if the test fails
1156+
*/
1157+
@Test
1158+
@Alerts("xcd")
1159+
public void specialBrackets8() throws Exception {
1160+
// [^] matches any character in JS
1161+
testEvaluate("'abdcd'.replace(/a[^]d/g, 'x')");
1162+
}
1163+
1164+
/**
1165+
* @throws Exception if the test fails
1166+
*/
1167+
@Test
1168+
@Alerts("x abdu")
1169+
public void specialBrackets9() throws Exception {
1170+
// [^] matches any character in JS
1171+
testEvaluate("'abdo abdu'.replace(/a[^]d[o]/g, 'x')");
1172+
}
1173+
11541174
/**
11551175
* @throws Exception if the test fails
11561176
*/

0 commit comments

Comments
 (0)