summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvrubezhny2013-11-13 15:34:35 (EST)
committervrubezhny2013-12-19 16:28:01 (EST)
commitc8dfc5df2624907827c61e5fffea628a1611eafb (patch)
treee91afecf2b5f4d808e8ff6c7c0f6aa1afa89547f
parente2d51f8b64e816c5fd64d09b0192c2d6edd3e5d4 (diff)
downloadwebtools.jsdt.tests-c8dfc5df2624907827c61e5fffea628a1611eafb.zip
webtools.jsdt.tests-c8dfc5df2624907827c61e5fffea628a1611eafb.tar.gz
webtools.jsdt.tests-c8dfc5df2624907827c61e5fffea628a1611eafb.tar.bz2
Bug 406519 - [validation] Valid JavaScript code flagged as error (regexp, infinity, non-breaking space)v201312192230
JUnit Test Case is added for the issue Signed-off-by: vrubezhny <vrubezhny@exadel.com>
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/parser/SyntaxErrorTest.java19
1 files changed, 19 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 5da47b2..cfcd7fb 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
@@ -329,6 +329,25 @@ public void test05h() {
testName);
}
+/**
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=406519
+ */
+public void testWhitespaces01() {
+ String s =
+ "var " + '\t' + '\r' + '\n' +
+ '\u000b' + '\u000c' +
+ '\u0020' + '\u00a0' + " x;\r";
+
+ String expectedSyntaxErrorDiagnosis =
+ "";
+
+ String testName = "<test>";
+ checkParse(
+ s.toCharArray(),
+ expectedSyntaxErrorDiagnosis,
+ testName);
+}
+
public void testWI106610() {
String s = "\n<!-- Begin";