mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-06 05:10:22 +07:00
Split default action tests in language-specific parts
GitOrigin-RevId: 4bcaf8c390fae1f20aa7c70fe78af95f57ab5ea8
This commit is contained in:
committed by
intellij-monorepo-bot
parent
eedeaadc79
commit
b231892391
@@ -0,0 +1,3 @@
|
||||
class A {
|
||||
private int[][] data = new int[][] {<caret>}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class Foo {
|
||||
int[] a = <caret>
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class Foo {
|
||||
int[] a = {<caret>}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class Foo {
|
||||
int[] a = new int[]<caret>
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class Foo {
|
||||
int[] a = new int[]{<caret>}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class A {
|
||||
private int[][] data = new int[][]{<caret>}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class A {
|
||||
private int[][] data = new int[][]{{<caret>}}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class A {
|
||||
private int[][] data = new int[][] {{<caret>}}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
public class A {
|
||||
void f(int i) {
|
||||
if (i == 0)
|
||||
<caret>
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
public class A {
|
||||
void f(int i) {
|
||||
if (i == 0)
|
||||
{<caret>
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A {
|
||||
void foo() {
|
||||
if (true) <caret>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A {
|
||||
void foo() {
|
||||
if (true) {<caret>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class A {
|
||||
void foo() <caret>
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class A {
|
||||
void foo() {<caret>}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
{
|
||||
f<caret>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
{
|
||||
f[<caret>]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
{
|
||||
<caret>f]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
{
|
||||
[<caret>f]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
{
|
||||
f<caret>a
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
{
|
||||
f[a
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
{
|
||||
f<caret>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
{
|
||||
f(<caret>)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
{
|
||||
<caret>f)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
{
|
||||
(<caret>f)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
{
|
||||
f<caret>a
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
{
|
||||
f(a
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
{
|
||||
f<caret>)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
{
|
||||
f(<caret>)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
{
|
||||
(f<caret>)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
{
|
||||
(f(<caret>))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
{
|
||||
// f<caret>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
{
|
||||
// f(<caret>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
class A{
|
||||
{
|
||||
<caret>
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
class A{
|
||||
{
|
||||
}<caret>
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class Foo {
|
||||
int[] abc = new int[]{<caret>}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class Foo {
|
||||
int[] abc = new int[]{}<caret>
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
class Foo {
|
||||
void foo() {
|
||||
{System.out.println();
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
class Foo {
|
||||
void foo() {
|
||||
{
|
||||
System.out.println();
|
||||
}<caret>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class Foo {
|
||||
int[] abc = new int[]{{<caret>}}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class Foo {
|
||||
int[] abc = new int[]{{}<caret>}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class Foo {
|
||||
void foo() {<caret>}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class Foo {
|
||||
void foo() {}<caret>
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
{
|
||||
f[<caret>]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
{
|
||||
f[]<caret>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
{
|
||||
arr[f[<caret>] = 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
{
|
||||
arr[f[]<caret>] = 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
{
|
||||
f(<caret>)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
{
|
||||
f()<caret>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
class A{
|
||||
{
|
||||
if (f(<caret>){
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
class A{
|
||||
{
|
||||
if (f()<caret>){
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
class A{
|
||||
{
|
||||
if (f(<caret>){
|
||||
}
|
||||
}
|
||||
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
class A{
|
||||
{
|
||||
if (f()<caret>){
|
||||
}
|
||||
}
|
||||
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A {
|
||||
{
|
||||
System.out.println("aaa(<caret>");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A {
|
||||
{
|
||||
System.out.println("aaa()<caret>");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A {
|
||||
{
|
||||
if( <caret>)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A {
|
||||
{
|
||||
if( )<caret>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
@Anno(
|
||||
param
|
||||
<caret>
|
||||
@@ -0,0 +1,3 @@
|
||||
@Anno(
|
||||
param
|
||||
)<caret>
|
||||
@@ -0,0 +1,30 @@
|
||||
// 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.defaultAction;
|
||||
|
||||
import com.intellij.JavaTestUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class JavaLBraceTest extends DefaultActionTestCase {
|
||||
@Override
|
||||
protected @NotNull String getTestDataPath() {
|
||||
return JavaTestUtil.getJavaTestDataPath();
|
||||
}
|
||||
|
||||
public void testArrayInitializer() { doTest(); }
|
||||
public void testArrayInitializerNoSpace() { doTest(); }
|
||||
public void testInsideCodeBlock() { doTest(); }
|
||||
public void testOutsideCodeBlock() { doTest(); }
|
||||
public void testArrayInitializerBegins() { doTest(); }
|
||||
public void testArrayInitializer1_5Style() { doTest(); }
|
||||
public void testIndentLBrace() { doTest(); }
|
||||
|
||||
private void doTest() {
|
||||
configureByFile(getTestPath() + ".java");
|
||||
performAction('{');
|
||||
checkResultByFile(getTestPath() + "_after.java");
|
||||
}
|
||||
|
||||
private String getTestPath() {
|
||||
return "/codeInsight/defaultAction/lbrace/" + getTestName(false);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
// 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.defaultAction;
|
||||
|
||||
import com.intellij.JavaTestUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class JavaLBracketTest extends DefaultActionTestCase {
|
||||
@Override
|
||||
protected @NotNull String getTestDataPath() {
|
||||
return JavaTestUtil.getJavaTestDataPath();
|
||||
}
|
||||
|
||||
public void test1() { doTest(); }
|
||||
|
||||
public void test2() { doTest(); }
|
||||
|
||||
public void test3() { doTest(); }
|
||||
|
||||
private void doTest() {
|
||||
String path = "/codeInsight/defaultAction/lbracket/";
|
||||
|
||||
configureByFile(path + getTestName(false) + ".java");
|
||||
performAction('[');
|
||||
checkResultByFile(path + getTestName(false) + "_after.java");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
// 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.defaultAction;
|
||||
|
||||
import com.intellij.JavaTestUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class JavaLParenthTest extends DefaultActionTestCase {
|
||||
@Override
|
||||
protected @NotNull String getTestDataPath() {
|
||||
return JavaTestUtil.getJavaTestDataPath();
|
||||
}
|
||||
|
||||
public void test1() { doTest(); }
|
||||
public void test2() { doTest(); }
|
||||
public void test3() { doTest(); }
|
||||
public void test4() { doTest(); }
|
||||
public void test5() { doTest(); }
|
||||
public void test6() { doTest(); }
|
||||
|
||||
private void doTest() {
|
||||
String path = "/codeInsight/defaultAction/lparenth/";
|
||||
|
||||
configureByFile(path + getTestName(false) + ".java");
|
||||
performAction('(');
|
||||
checkResultByFile(path + getTestName(false) + "_after.java");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// 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.defaultAction;
|
||||
|
||||
import com.intellij.JavaTestUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class JavaRBraceTest extends DefaultActionTestCase {
|
||||
@Override
|
||||
protected @NotNull String getTestDataPath() {
|
||||
return JavaTestUtil.getJavaTestDataPath();
|
||||
}
|
||||
|
||||
public void test1() { doTest(); }
|
||||
|
||||
public void testMethodClosingBrace() { doTest(); }
|
||||
public void testClosingBraceReformatsBlock() { doTest(); }
|
||||
|
||||
private void doTest() {
|
||||
String path = "/codeInsight/defaultAction/rbrace/";
|
||||
|
||||
configureByFile(path + getTestName(false) + ".java");
|
||||
performAction('}');
|
||||
checkResultByFile(path + getTestName(false) + "_after.java");
|
||||
}
|
||||
|
||||
public void testClosingNestedArrayInitializer() { doTest(); }
|
||||
public void testClosingArrayInitializer() { doTest(); }
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.intellij.codeInsight.defaultAction;
|
||||
|
||||
import com.intellij.JavaTestUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class JavaRBracketTest extends DefaultActionTestCase {
|
||||
@Override
|
||||
protected @NotNull String getTestDataPath() {
|
||||
return JavaTestUtil.getJavaTestDataPath();
|
||||
}
|
||||
|
||||
public void test1() { doTest(); }
|
||||
|
||||
public void test2() { doTest(); }
|
||||
|
||||
private void doTest() {
|
||||
String path = "/codeInsight/defaultAction/rbracket/";
|
||||
|
||||
configureByFile(path + getTestName(false) + ".java");
|
||||
performAction(']');
|
||||
checkResultByFile(path + getTestName(false) + "_after.java");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
// 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.defaultAction;
|
||||
|
||||
import com.intellij.JavaTestUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class JavaRParenthTest extends DefaultActionTestCase {
|
||||
private static final String BASE_PATH = "/codeInsight/defaultAction/rparenth/";
|
||||
|
||||
@Override
|
||||
protected @NotNull String getTestDataPath() {
|
||||
return JavaTestUtil.getJavaTestDataPath();
|
||||
}
|
||||
|
||||
public void test1() { doTest(); }
|
||||
|
||||
public void test2() { doTest(); }
|
||||
|
||||
public void test3() { doTest(); }
|
||||
|
||||
public void test4() { doTest(); }
|
||||
|
||||
public void test5() { doTest(); }
|
||||
|
||||
public void test6() { doTest(); }
|
||||
|
||||
private void doTest() {
|
||||
configureByFile(BASE_PATH + getTestName(false) + ".java");
|
||||
performAction(')');
|
||||
checkResultByFile(BASE_PATH + getTestName(false) + "_after.java");
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
|
||||
/*
|
||||
* Copyright 2000-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.java.codeInsight.defaultAction;
|
||||
|
||||
import com.intellij.ide.DataManager;
|
||||
import com.intellij.openapi.editor.actionSystem.EditorActionManager;
|
||||
import com.intellij.openapi.editor.actionSystem.TypedAction;
|
||||
import com.intellij.testFramework.LightJavaCodeInsightTestCase;
|
||||
|
||||
public abstract class DefaultActionTestCase extends LightJavaCodeInsightTestCase {
|
||||
protected void performAction(char c) {
|
||||
EditorActionManager.getInstance();
|
||||
TypedAction action = TypedAction.getInstance();
|
||||
action.actionPerformed(getEditor(), c, DataManager.getInstance().getDataContext());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// 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.defaultAction;
|
||||
|
||||
import com.intellij.ide.DataManager;
|
||||
import com.intellij.openapi.editor.actionSystem.EditorActionManager;
|
||||
import com.intellij.openapi.editor.actionSystem.TypedAction;
|
||||
import com.intellij.testFramework.LightPlatformCodeInsightTestCase;
|
||||
|
||||
public abstract class DefaultActionTestCase extends LightPlatformCodeInsightTestCase {
|
||||
protected void performAction(char c) {
|
||||
EditorActionManager.getInstance();
|
||||
TypedAction action = TypedAction.getInstance();
|
||||
action.actionPerformed(getEditor(), c, DataManager.getInstance().getDataContext());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
// 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.defaultAction;
|
||||
|
||||
import com.intellij.codeInsight.XmlTestUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class XmlGreaterTest extends DefaultActionTestCase {
|
||||
@Override
|
||||
protected @NotNull String getTestDataPath() {
|
||||
return XmlTestUtil.getXmlTestDataPath();
|
||||
}
|
||||
|
||||
public void testHtmlGreater() {
|
||||
String path = "/codeInsight/defaultAction/greater/";
|
||||
|
||||
configureByFile(path + "1.html");
|
||||
performAction('>');
|
||||
checkResultByFile(path + "1_after.html");
|
||||
|
||||
configureByFile(path + "2.html");
|
||||
performAction('>');
|
||||
checkResultByFile(path + "2_after.html");
|
||||
|
||||
configureByFile(path + "3.html");
|
||||
performAction('>');
|
||||
checkResultByFile(path + "3_after.html");
|
||||
|
||||
configureByFile(path + "4.html");
|
||||
performAction('>');
|
||||
checkResultByFile(path + "4_after.html");
|
||||
|
||||
configureByFile(path + "5.html");
|
||||
performAction('>');
|
||||
checkResultByFile(path + "5_after.html");
|
||||
|
||||
configureByFile(path + "6.html");
|
||||
performAction('>');
|
||||
checkResultByFile(path + "6_after.html");
|
||||
}
|
||||
|
||||
public void testXHtmlGreater() {
|
||||
String path = "/codeInsight/defaultAction/greater/";
|
||||
|
||||
configureByFile(path + "1.xhtml");
|
||||
performAction('>');
|
||||
checkResultByFile(path + "1_after.xhtml");
|
||||
}
|
||||
|
||||
public void testXmlGreater() {
|
||||
String path = "/codeInsight/defaultAction/greater/";
|
||||
|
||||
configureByFile(path + "1.xml");
|
||||
performAction('>');
|
||||
checkResultByFile(path + "1_after.xml");
|
||||
|
||||
configureByFile(path + "2.xml");
|
||||
performAction('>');
|
||||
checkResultByFile(path + "2_after.xml");
|
||||
|
||||
configureByFile(path + "3.xml");
|
||||
performAction('>');
|
||||
checkResultByFile(path + "3_after.xml");
|
||||
|
||||
configureByFile(path + "4.xml");
|
||||
performAction('>');
|
||||
checkResultByFile(path + "4_after.xml");
|
||||
|
||||
configureByFile(path + "5.xml");
|
||||
performAction('>');
|
||||
checkResultByFile(path + "5_after.xml");
|
||||
|
||||
configureByFile(path + "6.xml");
|
||||
performAction('>');
|
||||
checkResultByFile(path + "6_after.xml");
|
||||
|
||||
configureByFile(path + "7.xml");
|
||||
performAction('>');
|
||||
checkResultByFile(path + "7_after.xml");
|
||||
|
||||
configureByFile(path + "8.xml");
|
||||
performAction('>');
|
||||
checkResultByFile(path + "8_after.xml");
|
||||
|
||||
configureByFile(path + "9.xml");
|
||||
performAction('>');
|
||||
checkResultByFile(path + "9_after.xml");
|
||||
|
||||
configureByFile(path + "10.xml");
|
||||
performAction('>');
|
||||
checkResultByFile(path + "10_after.xml");
|
||||
|
||||
configureByFile(path + "11.xml");
|
||||
performAction('>');
|
||||
checkResultByFile(path + "11_after.xml");
|
||||
|
||||
configureByFile(path + "12.xml");
|
||||
performAction('>');
|
||||
checkResultByFile(path + "12_after.xml");
|
||||
|
||||
configureByFile(path + "12_2.xml");
|
||||
performAction('>');
|
||||
checkResultByFile(path + "12_2_after.xml");
|
||||
|
||||
configureByFile(path + "12_3.xml");
|
||||
performAction('>');
|
||||
checkResultByFile(path + "12_3_after.xml");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// 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.defaultAction;
|
||||
|
||||
import com.intellij.codeInsight.XmlTestUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class XmlQuoteTest extends DefaultActionTestCase {
|
||||
@Override
|
||||
protected @NotNull String getTestDataPath() {
|
||||
return XmlTestUtil.getXmlTestDataPath();
|
||||
}
|
||||
|
||||
public void testAttributeStart() { doTest('"'); }
|
||||
public void testAttributeEnd() { doTest('"'); }
|
||||
|
||||
private void doTest(char c) {
|
||||
String path = "/codeInsight/defaultAction/quote/";
|
||||
configureByFile(path + getTestName(false) + ".xml");
|
||||
performAction(c);
|
||||
checkResultByFile(path + getTestName(false) + "_after.xml");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.intellij.codeInsight.defaultAction;
|
||||
|
||||
import com.intellij.codeInsight.XmlTestUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class XmlSlashTest extends DefaultActionTestCase {
|
||||
@Override
|
||||
protected @NotNull String getTestDataPath() {
|
||||
return XmlTestUtil.getXmlTestDataPath();
|
||||
}
|
||||
|
||||
public void testXmlSlash() {
|
||||
String path = "/codeInsight/defaultAction/slash/";
|
||||
|
||||
configureByFile(path + "1.xml");
|
||||
performAction('/');
|
||||
checkResultByFile(path + "1_after.xml");
|
||||
|
||||
configureByFile(path + "2.xml");
|
||||
performAction('/');
|
||||
checkResultByFile(path + "2_after.xml");
|
||||
|
||||
configureByFile(path + "3.xml");
|
||||
performAction('/');
|
||||
checkResultByFile(path + "3_after.xml");
|
||||
|
||||
configureByFile(path + "4.xml");
|
||||
performAction('/');
|
||||
checkResultByFile(path + "4_after.xml");
|
||||
}
|
||||
|
||||
public void testHtmlSlash() {
|
||||
String path = "/codeInsight/defaultAction/slash/";
|
||||
|
||||
configureByFile(path + "1.html");
|
||||
performAction('/');
|
||||
checkResultByFile(path + "1_after.html");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<a<caret>
|
||||
@@ -0,0 +1,3 @@
|
||||
<html>
|
||||
<head<caret>
|
||||
</html>
|
||||
@@ -0,0 +1 @@
|
||||
<aaa<caret>
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<existenttag><tag<caret></existenttag>
|
||||
</root>
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<existenttag><tag><caret></tag></existenttag>
|
||||
</root>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<sample><inner>text1</inner></sample>
|
||||
<sample>text3<inner<caret>tail</sample>
|
||||
</root>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<sample><inner>text1</inner></sample>
|
||||
<sample>text3<inner><caret></inner>tail</sample>
|
||||
</root>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div><div>
|
||||
<div<caret>
|
||||
</div></div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div><div>
|
||||
<div<caret></div>
|
||||
</div></div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div><div>
|
||||
<div><caret></div>
|
||||
</div></div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<body><div><div>
|
||||
<div<caret>
|
||||
</div></div></body>
|
||||
@@ -0,0 +1,3 @@
|
||||
<body><div><div>
|
||||
<div><caret></div>
|
||||
</div></div></body>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div><div>
|
||||
<div><caret></div>
|
||||
</div></div>
|
||||
@@ -0,0 +1 @@
|
||||
<a><caret></a>
|
||||
@@ -0,0 +1,3 @@
|
||||
<html>
|
||||
<head><caret></head>
|
||||
</html>
|
||||
@@ -0,0 +1 @@
|
||||
<aaa><caret></aaa>
|
||||
@@ -0,0 +1,3 @@
|
||||
<html>
|
||||
<a href=""<caret>
|
||||
</html>
|
||||
@@ -0,0 +1,3 @@
|
||||
<root>
|
||||
<aaa<caret> aaaa
|
||||
</root>
|
||||
@@ -0,0 +1,3 @@
|
||||
<html>
|
||||
<a href=""><caret></a>
|
||||
</html>
|
||||
@@ -0,0 +1,3 @@
|
||||
<root>
|
||||
<aaa><caret></aaa> aaaa
|
||||
</root>
|
||||
@@ -0,0 +1,9 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head></head>
|
||||
<body>
|
||||
<hr>
|
||||
<a<caret>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,3 @@
|
||||
<html>
|
||||
<head<caret>
|
||||
</html>
|
||||
@@ -0,0 +1,9 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head></head>
|
||||
<body>
|
||||
<hr>
|
||||
<a><caret></a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,3 @@
|
||||
<html>
|
||||
<head><caret></head>
|
||||
</html>
|
||||
@@ -0,0 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<link<caret>
|
||||
</head>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<html>
|
||||
<head/<caret>
|
||||
</html>
|
||||
@@ -0,0 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<link><caret>
|
||||
</head>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<html>
|
||||
<head/><caret>
|
||||
</html>
|
||||
11
xml/tests/testData/codeInsight/defaultAction/greater/5.html
Normal file
11
xml/tests/testData/codeInsight/defaultAction/greater/5.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<html>
|
||||
<body>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<table<caret>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<head>
|
||||
<link<caret>
|
||||
</head>
|
||||
</html>
|
||||
@@ -0,0 +1,11 @@
|
||||
<html>
|
||||
<body>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<table><caret></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user