introduce injected fragment as string (IDEA-90322)

This commit is contained in:
Anna Kozlova
2012-08-22 20:48:09 +04:00
parent aa78ca0308
commit 9558ec4df4
4 changed files with 52 additions and 9 deletions
@@ -0,0 +1,6 @@
class Test {
{
String regexp = "|\t";
String[] parts = "".split(regexp);
}
}
@@ -0,0 +1,5 @@
class Test {
{
String[] parts = "".split("|<caret>\t");
}
}
@@ -109,6 +109,10 @@ public class IntroduceVariableTest extends LightCodeInsightTestCase {
doTest(new MockIntroduceVariableHandler("it", false, false, false, "java.lang.String"));
}
public void testFromInjected() throws Exception {
doTest(new MockIntroduceVariableHandler("regexp", false, false, false, "java.lang.String"));
}
public void testSCR10412() throws Exception {
doTest(new MockIntroduceVariableHandler("newVar", false, false, false, "java.lang.String[]"));
}