Created
July 30, 2012 15:53
-
-
Save anba/3207968 to your computer and use it in GitHub Desktop.
Minimal test case for 'Infinite loop with rhino1.7R4'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.mozilla.javascript.tests; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.nio.charset.Charset; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; | |
import org.junit.After; | |
import org.junit.Before; | |
import org.junit.Ignore; | |
import org.junit.Test; | |
import org.mozilla.javascript.Context; | |
import org.mozilla.javascript.ScriptableObject; | |
/** | |
* @author André Bargull | |
*/ | |
public class CssLintLoop { | |
private Context cx; | |
private ScriptableObject scope; | |
@Before | |
public void setUp() throws Exception { | |
cx = Context.enter(); | |
cx.setOptimizationLevel(-1); | |
scope = cx.initStandardObjects(); | |
} | |
@After | |
public void tearDown() throws Exception { | |
Context.exit(); | |
} | |
@Test | |
public void test_min() throws IOException { | |
String source = ""; | |
source += "var result = /[a-z_\\u0080-\\uFFFF\\\\]/i.test('f')"; | |
cx.evaluateString(scope, source, "css", 1, null); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment