forked from phoedos/pmd
Merge branch 'master' into pmd/7.0.x
This commit is contained in:
@@ -11,6 +11,10 @@
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<java.version>8</java.version>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
@@ -80,6 +84,7 @@
|
||||
<dependency>
|
||||
<groupId>org.mozilla</groupId>
|
||||
<artifactId>rhino</artifactId>
|
||||
<version>1.7.13</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
|
||||
@@ -6,6 +6,7 @@ package net.sourceforge.pmd.lang.ecmascript.ast;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -178,4 +179,13 @@ public class EcmascriptParserTest extends EcmascriptParserTestBase {
|
||||
ASTAssignment infix = rootNode.getFirstDescendantOfType(ASTAssignment.class);
|
||||
assertEquals("^=", infix.getImage());
|
||||
}
|
||||
|
||||
/**
|
||||
* [javascript] Failing with OutOfMemoryError parsing a Javascript file #2081
|
||||
*/
|
||||
@Test(timeout = 5000L)
|
||||
public void shouldNotFailWithOutOfMemory() {
|
||||
ASTAstRoot rootNode = js.parse("(``\n);");
|
||||
assertNotNull(rootNode);
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user