Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SyntaxErrorTest.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SyntaxErrorTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SyntaxErrorTest.java
index 678ed29..586f0d9 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SyntaxErrorTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SyntaxErrorTest.java
@@ -346,4 +346,28 @@ public void testWI106610() {
expectedSyntaxErrorDiagnosis,
testName);
}
+
+public void testRegExpression01() {
+ String s = "searchStr.replace( /([!\"#$%&'()*+,./:;<=>?@[\\]^`{|}~])/g, '//' )";
+ String expectedSyntaxErrorDiagnosis = "";
+ String testName = "<test>";
+
+ checkParse(
+ s.toCharArray(),
+ expectedSyntaxErrorDiagnosis,
+ testName);
+}
+
+public void testRegExpression02() {
+ String s = "searchStr.replace(/\\n( |\t)*[/][/]/g,'//')";
+ String expectedSyntaxErrorDiagnosis = "";
+ String testName = "<test>";
+
+ checkParse(
+ s.toCharArray(),
+ expectedSyntaxErrorDiagnosis,
+ testName);
+}
+
+
}

Back to the top