mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
RegExp: check highlighting in quickfix tests too
This commit is contained in:
+1
-1
@@ -24,7 +24,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class OctalEscapeInspectionTest extends RegExpInspectionTestCase {
|
||||
|
||||
public void testSimple() {
|
||||
quickfixTest("\\011<caret>", "\\x09", "Replace with '\\x09'");
|
||||
quickfixTest("<warning descr=\"Octal escape '\\011' in RegExp\">\\011</warning>", "\\x09", "Replace with '\\x09'");
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -42,6 +42,7 @@ public abstract class RegExpInspectionTestCase extends LightPlatformCodeInsightF
|
||||
protected void quickfixTest(@Language("RegExp") String before, @Language("RegExp") String after, String hint) {
|
||||
myFixture.enableInspections(getInspection());
|
||||
myFixture.configureByText(RegExpFileType.INSTANCE, before);
|
||||
myFixture.testHighlighting();
|
||||
final IntentionAction intention = findIntention(hint);
|
||||
assertNotNull(intention);
|
||||
myFixture.launchAction(intention);
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ public class RepeatedSpaceInspectionTest extends RegExpInspectionTestCase {
|
||||
}
|
||||
|
||||
public void testReplacement() {
|
||||
quickfixTest(" ", " {5}", "Replace with ' {5}'");
|
||||
quickfixTest("<warning descr=\"5 consecutive spaces in RegExp\"> </warning>", " {5}", "Replace with ' {5}'");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ public class SingleCharAlternationInspectionTest extends RegExpInspectionTestCas
|
||||
}
|
||||
|
||||
public void testQuickfix() {
|
||||
quickfixTest("x|y|z", "[xyz]", "Replace with '[xyz]'");
|
||||
quickfixTest("<warning descr=\"Single character alternation in RegExp\">x|y|z</warning>", "[xyz]", "Replace with '[xyz]'");
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user