mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Move XML-specific part of SelectWordTest to xml-tests module
GitOrigin-RevId: d3a2cbfaf3252068423d22fdfaf31c2832d93c2f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d604e0acb0
commit
5bceae86a4
@@ -6,7 +6,6 @@ import com.intellij.codeInsight.folding.CodeFoldingManager;
|
||||
import com.intellij.ide.DataManager;
|
||||
import com.intellij.openapi.actionSystem.ActionManager;
|
||||
import com.intellij.openapi.actionSystem.IdeActions;
|
||||
import com.intellij.openapi.application.ex.PathManagerEx;
|
||||
import com.intellij.openapi.editor.actionSystem.EditorAction;
|
||||
import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
|
||||
import com.intellij.testFramework.LightPlatformCodeInsightTestCase;
|
||||
@@ -27,7 +26,7 @@ public abstract class SelectWordTestBase extends LightPlatformCodeInsightTestCas
|
||||
while (true) {
|
||||
final String fileName = "/after" + i + "." + ext;
|
||||
@NonNls String resultPath = path + fileName;
|
||||
if (new File(PathManagerEx.getTestDataPath() + resultPath).exists()) {
|
||||
if (new File(getTestDataPath() + resultPath).exists()) {
|
||||
getHandler().execute(getEditor(), null, DataManager.getInstance().getDataContextFromFocus().getResultSync());
|
||||
checkResultByFile(fileName, resultPath, true);
|
||||
i++;
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
// 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 org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class XmlSelectWordTest extends SelectWordTestBase {
|
||||
@Override
|
||||
protected @NotNull String getTestDataPath() {
|
||||
return XmlTestUtil.getXmlTestDataPath();
|
||||
}
|
||||
|
||||
public void testHtml1() {
|
||||
doTest("html");
|
||||
}
|
||||
|
||||
public void testHtml2() {
|
||||
doTest("html");
|
||||
}
|
||||
|
||||
public void testHtml3() {
|
||||
doTest("html");
|
||||
}
|
||||
|
||||
public void testHtml4() {
|
||||
doTest("html");
|
||||
}
|
||||
|
||||
public void testHtml5() {
|
||||
doTest("html");
|
||||
}
|
||||
|
||||
public void testHtml6() {
|
||||
doTest("html");
|
||||
}
|
||||
public void testHtml7() {
|
||||
doTest("html");
|
||||
}
|
||||
|
||||
public void testHtml8() {
|
||||
doTest("html");
|
||||
}
|
||||
|
||||
public void testHtml9() {
|
||||
doTest("html");
|
||||
}
|
||||
|
||||
public void testHtml10() {
|
||||
doTest("html");
|
||||
}
|
||||
|
||||
public void testHtml11() {
|
||||
doTest("html");
|
||||
}
|
||||
|
||||
public void testHtml12() {
|
||||
doTest("html");
|
||||
}
|
||||
|
||||
public void testHtml13() {
|
||||
doTest("html");
|
||||
}
|
||||
|
||||
public void testHtml14() {
|
||||
doTest("html");
|
||||
}
|
||||
|
||||
public void testSelectPathInStringLiteral() {
|
||||
doTest("html");
|
||||
}
|
||||
|
||||
public void testSelectPathBeforeStringLiteral() {
|
||||
doTest("html");
|
||||
}
|
||||
|
||||
public void testXml1() {
|
||||
doTest("xml");
|
||||
}
|
||||
public void testXml11() {
|
||||
doTest("xml");
|
||||
}
|
||||
|
||||
public void testXml2() {
|
||||
doTest("xml");
|
||||
}
|
||||
|
||||
public void testDtd() {
|
||||
doTest("dtd");
|
||||
}
|
||||
public void testDtd1() {
|
||||
doTest("dtd");
|
||||
}
|
||||
|
||||
public void testXml3() {
|
||||
doTest("xml");
|
||||
}
|
||||
|
||||
public void testXmlStartLine() {
|
||||
doTest("xml");
|
||||
}
|
||||
|
||||
public void testXmlCommentAboveTag() {
|
||||
doTest("xml");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
<!ELEMENT myElement (#PCDATA)>
|
||||
<!ATTLIST myElement myAttribute (true | <selection>fa<caret>lse</selection>) "false">
|
||||
@@ -0,0 +1,3 @@
|
||||
<!ELEMENT myElement (#PCDATA)>
|
||||
<selection><!ATTLIST myElement myAttribute (true | fa<caret>lse) "false">
|
||||
</selection>
|
||||
@@ -0,0 +1,3 @@
|
||||
<selection><!ELEMENT myElement (#PCDATA)>
|
||||
<!ATTLIST myElement myAttribute (true | fa<caret>lse) "false">
|
||||
</selection>
|
||||
@@ -0,0 +1,2 @@
|
||||
<!ELEMENT myElement (#PCDATA)>
|
||||
<!ATTLIST myElement myAttribute (true | fa<caret>lse) "false">
|
||||
@@ -0,0 +1,2 @@
|
||||
<!ELEMENT <selection>myE<caret>lement</selection> (#PCDATA)>
|
||||
<!ELEMENT myElement2 (#PCDATA)>
|
||||
@@ -0,0 +1,2 @@
|
||||
<selection> <!ELEMENT myE<caret>lement (#PCDATA)>
|
||||
</selection> <!ELEMENT myElement2 (#PCDATA)>
|
||||
@@ -0,0 +1,3 @@
|
||||
<selection> <!ELEMENT myE<caret>lement (#PCDATA)>
|
||||
<!ELEMENT myElement2 (#PCDATA)>
|
||||
</selection>
|
||||
@@ -0,0 +1,2 @@
|
||||
<!ELEMENT myE<caret>lement (#PCDATA)>
|
||||
<!ELEMENT myElement2 (#PCDATA)>
|
||||
@@ -0,0 +1,5 @@
|
||||
<a>
|
||||
|
||||
<selection>so<caret>me</selection> text
|
||||
|
||||
</a>
|
||||
@@ -0,0 +1,5 @@
|
||||
<a>
|
||||
|
||||
<selection>so<caret>me text</selection>
|
||||
|
||||
</a>
|
||||
@@ -0,0 +1,5 @@
|
||||
<a><selection>
|
||||
|
||||
so<caret>me text
|
||||
|
||||
</selection></a>
|
||||
@@ -0,0 +1,5 @@
|
||||
<selection><a>
|
||||
|
||||
so<caret>me text
|
||||
|
||||
</a></selection>
|
||||
@@ -0,0 +1,5 @@
|
||||
<a>
|
||||
|
||||
so<caret>me text
|
||||
|
||||
</a>
|
||||
@@ -0,0 +1 @@
|
||||
<input id="checkid" type="checkbox" title="Select" onchange="&<selection>a<caret>mp</selection>;"/>
|
||||
@@ -0,0 +1 @@
|
||||
<input id="checkid" type="checkbox" title="Select" onchange="<selection>&a<caret>mp;</selection>"/>
|
||||
@@ -0,0 +1 @@
|
||||
<input id="checkid" type="checkbox" title="Select" onchange=<selection>"&a<caret>mp;"</selection>/>
|
||||
@@ -0,0 +1 @@
|
||||
<input id="checkid" type="checkbox" title="Select" <selection>onchange="&a<caret>mp;"</selection>/>
|
||||
@@ -0,0 +1 @@
|
||||
<input id="checkid" type="checkbox" title="Select" onchange="&a<caret>mp;"/>
|
||||
@@ -0,0 +1 @@
|
||||
<selection><caret><a href=""></selection>my link</a>
|
||||
@@ -0,0 +1 @@
|
||||
<selection><caret><a href="">my link</a></selection>
|
||||
@@ -0,0 +1 @@
|
||||
<caret><a href="">my link</a>
|
||||
@@ -0,0 +1,4 @@
|
||||
<div>
|
||||
file1: C:\Windows\something\somewhere
|
||||
file2: http://jetbrains.com/<selection>in<caret>dex</selection>.jsp?param=a/b/c
|
||||
</div>
|
||||
@@ -0,0 +1,4 @@
|
||||
<div>
|
||||
file1: C:\Windows\something\somewhere
|
||||
file2: http://jetbrains.com/<selection>in<caret>dex.jsp</selection>?param=a/b/c
|
||||
</div>
|
||||
@@ -0,0 +1,4 @@
|
||||
<div>
|
||||
file1: C:\Windows\something\somewhere
|
||||
file2: http://jetbrains.com/<selection>in<caret>dex.jsp?param=a/b/c</selection>
|
||||
</div>
|
||||
@@ -0,0 +1,4 @@
|
||||
<div>
|
||||
file1: C:\Windows\something\somewhere
|
||||
file2: http://<selection>jetbrains.com/in<caret>dex.jsp?param=a/b/c</selection>
|
||||
</div>
|
||||
@@ -0,0 +1,4 @@
|
||||
<div>
|
||||
file1: C:\Windows\something\somewhere
|
||||
file2: <selection>http://jetbrains.com/in<caret>dex.jsp?param=a/b/c</selection>
|
||||
</div>
|
||||
@@ -0,0 +1,4 @@
|
||||
<div>
|
||||
file1: C:\Windows\something\somewhere
|
||||
<selection>file2: http://jetbrains.com/in<caret>dex.jsp?param=a/b/c</selection>
|
||||
</div>
|
||||
@@ -0,0 +1,4 @@
|
||||
<div>
|
||||
file1: C:\Windows\something\somewhere
|
||||
<selection> file2: http://jetbrains.com/in<caret>dex.jsp?param=a/b/c</selection>
|
||||
</div>
|
||||
@@ -0,0 +1,4 @@
|
||||
<div><selection>
|
||||
file1: C:\Windows\something\somewhere
|
||||
file2: http://jetbrains.com/in<caret>dex.jsp?param=a/b/c
|
||||
</selection></div>
|
||||
@@ -0,0 +1,4 @@
|
||||
<div>
|
||||
file1: C:\Windows\something\somewhere
|
||||
file2: http://jetbrains.com/in<caret>dex.jsp?param=a/b/c
|
||||
</div>
|
||||
@@ -0,0 +1,4 @@
|
||||
<div>
|
||||
file1: C:\Windows\<selection>somet<caret>hing</selection>\somewhere
|
||||
file2: http://jetbrains.com/index.jsp?param=a/b/c
|
||||
</div>
|
||||
@@ -0,0 +1,4 @@
|
||||
<div>
|
||||
file1: C:\<selection>Windows\somet<caret>hing</selection>\somewhere
|
||||
file2: http://jetbrains.com/index.jsp?param=a/b/c
|
||||
</div>
|
||||
@@ -0,0 +1,4 @@
|
||||
<div>
|
||||
file1: <selection>C:\Windows\somet<caret>hing</selection>\somewhere
|
||||
file2: http://jetbrains.com/index.jsp?param=a/b/c
|
||||
</div>
|
||||
@@ -0,0 +1,4 @@
|
||||
<div>
|
||||
<selection>file1: C:\Windows\somet<caret>hing</selection>\somewhere
|
||||
file2: http://jetbrains.com/index.jsp?param=a/b/c
|
||||
</div>
|
||||
@@ -0,0 +1,4 @@
|
||||
<div>
|
||||
<selection>file1: C:\Windows\somet<caret>hing\somewhere</selection>
|
||||
file2: http://jetbrains.com/index.jsp?param=a/b/c
|
||||
</div>
|
||||
@@ -0,0 +1,4 @@
|
||||
<div>
|
||||
<selection> file1: C:\Windows\somet<caret>hing\somewhere</selection>
|
||||
file2: http://jetbrains.com/index.jsp?param=a/b/c
|
||||
</div>
|
||||
@@ -0,0 +1,4 @@
|
||||
<div><selection>
|
||||
file1: C:\Windows\somet<caret>hing\somewhere
|
||||
file2: http://jetbrains.com/index.jsp?param=a/b/c
|
||||
</selection></div>
|
||||
@@ -0,0 +1,4 @@
|
||||
<div>
|
||||
file1: C:\Windows\somet<caret>hing\somewhere
|
||||
file2: http://jetbrains.com/index.jsp?param=a/b/c
|
||||
</div>
|
||||
@@ -0,0 +1 @@
|
||||
<div src="C:\Windows\<selection>somet<caret>hing</selection>\somewhere"></div>
|
||||
@@ -0,0 +1 @@
|
||||
<div src="C:\<selection>Windows\somet<caret>hing</selection>\somewhere"></div>
|
||||
@@ -0,0 +1 @@
|
||||
<div src="<selection>C:\Windows\somet<caret>hing</selection>\somewhere"></div>
|
||||
@@ -0,0 +1 @@
|
||||
<div src="<selection>C:\Windows\somet<caret>hing\somewhere</selection>"></div>
|
||||
@@ -0,0 +1 @@
|
||||
<div src=<selection>"C:\Windows\somet<caret>hing\somewhere"</selection>></div>
|
||||
@@ -0,0 +1 @@
|
||||
<div src="C:\Windows\somet<caret>hing\somewhere"></div>
|
||||
@@ -0,0 +1,5 @@
|
||||
<<selection>t<caret>ag</selection> attr="value" another="value">
|
||||
|
||||
some Text
|
||||
|
||||
</tag>
|
||||
@@ -0,0 +1,5 @@
|
||||
<selection><t<caret>ag attr="value" another="value"></selection>
|
||||
|
||||
some Text
|
||||
|
||||
</tag>
|
||||
@@ -0,0 +1,5 @@
|
||||
<selection><t<caret>ag attr="value" another="value">
|
||||
|
||||
some Text
|
||||
|
||||
</tag></selection>
|
||||
@@ -0,0 +1,5 @@
|
||||
<t<caret>ag attr="value" another="value">
|
||||
|
||||
some Text
|
||||
|
||||
</tag>
|
||||
@@ -0,0 +1,5 @@
|
||||
<tag attr="<selection>va<caret>lue</selection>" another="value">
|
||||
|
||||
some Text
|
||||
|
||||
</tag>
|
||||
@@ -0,0 +1,5 @@
|
||||
<tag attr=<selection>"va<caret>lue"</selection> another="value">
|
||||
|
||||
some Text
|
||||
|
||||
</tag>
|
||||
@@ -0,0 +1,5 @@
|
||||
<tag <selection>attr="va<caret>lue"</selection> another="value">
|
||||
|
||||
some Text
|
||||
|
||||
</tag>
|
||||
@@ -0,0 +1,5 @@
|
||||
<selection><tag attr="va<caret>lue" another="value"></selection>
|
||||
|
||||
some Text
|
||||
|
||||
</tag>
|
||||
@@ -0,0 +1,5 @@
|
||||
<tag attr="va<caret>lue" another="value">
|
||||
|
||||
some Text
|
||||
|
||||
</tag>
|
||||
@@ -0,0 +1,5 @@
|
||||
<tag attr="value" <selection>ano<caret>ther</selection>="value">
|
||||
|
||||
some Text
|
||||
|
||||
</tag>
|
||||
@@ -0,0 +1,5 @@
|
||||
<tag attr="value" <selection>ano<caret>ther="value"</selection>>
|
||||
|
||||
some Text
|
||||
|
||||
</tag>
|
||||
@@ -0,0 +1,5 @@
|
||||
<selection><tag attr="value" ano<caret>ther="value"></selection>
|
||||
|
||||
some Text
|
||||
|
||||
</tag>
|
||||
@@ -0,0 +1,5 @@
|
||||
<tag attr="value" ano<caret>ther="value">
|
||||
|
||||
some Text
|
||||
|
||||
</tag>
|
||||
@@ -0,0 +1,3 @@
|
||||
<a>
|
||||
<foo></<selection>fo<caret>o</selection>>
|
||||
</a>
|
||||
@@ -0,0 +1,3 @@
|
||||
<a>
|
||||
<foo><selection></fo<caret>o></selection>
|
||||
</a>
|
||||
@@ -0,0 +1,3 @@
|
||||
<a>
|
||||
<selection><foo></fo<caret>o></selection>
|
||||
</a>
|
||||
@@ -0,0 +1,3 @@
|
||||
<a>
|
||||
<foo></fo<caret>o>
|
||||
</a>
|
||||
@@ -0,0 +1 @@
|
||||
<img ALIGN=<selection>MI<caret>DDLE</selection> BORDER=0 HSPACE=5 VSPACE=1 ALT="" SRC="images/1_tr.gif">
|
||||
@@ -0,0 +1 @@
|
||||
<img <selection>ALIGN=MI<caret>DDLE</selection> BORDER=0 HSPACE=5 VSPACE=1 ALT="" SRC="images/1_tr.gif">
|
||||
@@ -0,0 +1 @@
|
||||
<selection><img ALIGN=MI<caret>DDLE BORDER=0 HSPACE=5 VSPACE=1 ALT="" SRC="images/1_tr.gif"></selection>
|
||||
@@ -0,0 +1 @@
|
||||
<img ALIGN=MI<caret>DDLE BORDER=0 HSPACE=5 VSPACE=1 ALT="" SRC="images/1_tr.gif">
|
||||
@@ -0,0 +1 @@
|
||||
<img ALIGN=MIDDLE BORDER=0 HSPACE=5 VSPACE=1 <selection>AL<caret>T</selection>="" SRC="images/1_tr.gif">
|
||||
@@ -0,0 +1 @@
|
||||
<img ALIGN=MIDDLE BORDER=0 HSPACE=5 VSPACE=1 <selection>AL<caret>T=""</selection> SRC="images/1_tr.gif">
|
||||
@@ -0,0 +1 @@
|
||||
<img ALIGN=MIDDLE BORDER=0 HSPACE=5 VSPACE=1 AL<caret>T="" SRC="images/1_tr.gif">
|
||||
@@ -0,0 +1 @@
|
||||
<a href="/some/ref/foo&<selection>b<caret>ar</selection>">jdjfkd</a>
|
||||
@@ -0,0 +1 @@
|
||||
<a href="/some/ref/<selection>foo&b<caret>ar</selection>">jdjfkd</a>
|
||||
@@ -0,0 +1 @@
|
||||
<a href="/some/<selection>ref/foo&b<caret>ar</selection>">jdjfkd</a>
|
||||
@@ -0,0 +1 @@
|
||||
<a href="/<selection>some/ref/foo&b<caret>ar</selection>">jdjfkd</a>
|
||||
@@ -0,0 +1 @@
|
||||
<a href="<selection>/some/ref/foo&b<caret>ar</selection>">jdjfkd</a>
|
||||
@@ -0,0 +1 @@
|
||||
<a href=<selection>"/some/ref/foo&b<caret>ar"</selection>>jdjfkd</a>
|
||||
@@ -0,0 +1 @@
|
||||
<a href="/some/ref/foo&b<caret>ar">jdjfkd</a>
|
||||
@@ -0,0 +1 @@
|
||||
<input id="checkid" type="checkbox" title="Select" onchange="<selection><caret>"</selection>/>
|
||||
@@ -0,0 +1 @@
|
||||
<input id="checkid" type="checkbox" title="Select" onchange=<selection>"<caret>"</selection>/>
|
||||
@@ -0,0 +1 @@
|
||||
<input id="checkid" type="checkbox" title="Select" <selection>onchange="<caret>"</selection>/>
|
||||
@@ -0,0 +1 @@
|
||||
<input id="checkid" type="checkbox" title="Select" onchange="<caret>"/>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div src=<selection><caret>"</selection>hello/world/intellij"></div>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div src=<selection><caret>"hello/world/intellij"</selection>></div>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div <selection>src=<caret>"hello/world/intellij"</selection>></div>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<selection><div src=<caret>"hello/world/intellij"></selection></div>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div src=<caret>"hello/world/intellij"></div>
|
||||
@@ -0,0 +1 @@
|
||||
<div src="<selection><caret>hello</selection>/world/intellij"></div>
|
||||
@@ -0,0 +1 @@
|
||||
<div src="<selection><caret>hello/world/intellij</selection>"></div>
|
||||
@@ -0,0 +1 @@
|
||||
<div src=<selection>"<caret>hello/world/intellij"</selection>></div>
|
||||
@@ -0,0 +1 @@
|
||||
<div <selection>src="<caret>hello/world/intellij"</selection>></div>
|
||||
@@ -0,0 +1 @@
|
||||
<selection><div src="<caret>hello/world/intellij"></selection></div>
|
||||
@@ -0,0 +1 @@
|
||||
<div src="<caret>hello/world/intellij"></div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<foo>
|
||||
<bar>A < <selection>B<caret></selection></bar>
|
||||
</foo>
|
||||
@@ -0,0 +1,3 @@
|
||||
<foo>
|
||||
<bar><selection>A < B<caret></selection></bar>
|
||||
</foo>
|
||||
@@ -0,0 +1,3 @@
|
||||
<foo>
|
||||
<selection><bar>A < B<caret></bar></selection>
|
||||
</foo>
|
||||
@@ -0,0 +1,3 @@
|
||||
<foo>
|
||||
<bar>A < B<caret></bar>
|
||||
</foo>
|
||||
@@ -0,0 +1,3 @@
|
||||
<foo>
|
||||
<selection><caret><bar>A < B</bar></selection>
|
||||
</foo>
|
||||
@@ -0,0 +1,3 @@
|
||||
<foo>
|
||||
<caret><bar>A < B</bar>
|
||||
</foo>
|
||||
@@ -0,0 +1,3 @@
|
||||
<a>
|
||||
<foo attr="asdf <selection><caret>asdf</selection> " />
|
||||
</a>
|
||||
@@ -0,0 +1,3 @@
|
||||
<a>
|
||||
<foo attr="<selection>asdf <caret>asdf </selection>" />
|
||||
</a>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user