Split BackspaceTest into language-specific parts

GitOrigin-RevId: ac0cd278e8e678688160590e92e886647eb15bb3
This commit is contained in:
Dmitry Jemerov
2022-06-15 13:28:22 +00:00
committed by intellij-monorepo-bot
parent c11a81daa1
commit daa05ed703
8 changed files with 59 additions and 0 deletions
@@ -0,0 +1 @@
([(<caret>)])
@@ -0,0 +1,25 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.codeInsight;
import com.intellij.testFramework.LightPlatformCodeInsightTestCase;
import com.intellij.testFramework.PlatformTestUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
public class PlainTextBackspaceTest extends LightPlatformCodeInsightTestCase {
@NotNull
@Override
protected String getTestDataPath() {
return PlatformTestUtil.getPlatformTestDataPath();
}
public void testDifferentBrackets() { doTest(); }
private void doTest() {
@NonNls String path = "/codeInsight/backspace/";
configureByFile(path + getTestName(false) + ".txt");
backspace();
checkResultByFile(path + getTestName(false) + "_after.txt");
}
}
@@ -0,0 +1,24 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.codeInsight;
import com.intellij.testFramework.LightPlatformCodeInsightTestCase;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
public class XmlBackspaceTest extends LightPlatformCodeInsightTestCase {
@Override
protected @NotNull String getTestDataPath() {
return XmlTestUtil.getXmlTestDataPath();
}
public void testQuoteInXml() { doTest(); }
public void testQuoteInXml2() { doTest(); }
private void doTest() {
@NonNls String path = "/codeInsight/backspace/";
configureByFile(path + getTestName(false) + ".xml");
backspace();
checkResultByFile(path + getTestName(false) + "_after.xml");
}
}
@@ -0,0 +1,2 @@
<root a="<caret>">
</root>
@@ -0,0 +1,2 @@
<root a=""<caret>">
</root>
@@ -0,0 +1,2 @@
<root a="<caret>">
</root>
@@ -0,0 +1,2 @@
<root a=<caret>>
</root>