summaryrefslogtreecommitdiff
path: root/platform/platform-tests/testSrc/com/intellij/openapi/editor/actions/SelectUnselectOccurrenceActionsTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/platform-tests/testSrc/com/intellij/openapi/editor/actions/SelectUnselectOccurrenceActionsTest.java')
-rw-r--r--platform/platform-tests/testSrc/com/intellij/openapi/editor/actions/SelectUnselectOccurrenceActionsTest.java30
1 files changed, 29 insertions, 1 deletions
diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/editor/actions/SelectUnselectOccurrenceActionsTest.java b/platform/platform-tests/testSrc/com/intellij/openapi/editor/actions/SelectUnselectOccurrenceActionsTest.java
index 90a82e972379..42faeaa86e85 100644
--- a/platform/platform-tests/testSrc/com/intellij/openapi/editor/actions/SelectUnselectOccurrenceActionsTest.java
+++ b/platform/platform-tests/testSrc/com/intellij/openapi/editor/actions/SelectUnselectOccurrenceActionsTest.java
@@ -49,6 +49,30 @@ public class SelectUnselectOccurrenceActionsTest extends LightPlatformCodeInsigh
super.tearDown();
}
+ public void testAllWithoutInitialSelection() throws Exception {
+ init("some t<caret>ext\n" +
+ "some texts\n" +
+ "another text here"
+ );
+ executeSelectAllAction();
+ checkResult("some <selection>t<caret>ext</selection>\n" +
+ "some texts\n" +
+ "another <selection>t<caret>ext</selection> here");
+ }
+
+ public void testAllWithInitialWholeWordSelection() throws Exception {
+ init("some <selection>t<caret>ext</selection>\n" +
+ "some texts\n" +
+ "some texts\n" +
+ "another text here");
+ executeSelectAllAction();
+ checkResult("some <selection>t<caret>ext</selection>\n" +
+ "some texts\n" +
+ "some texts\n" +
+ "another <selection>t<caret>ext</selection> here");
+ assertEquals(0, hintCount);
+ }
+
public void testNoInitialSelection() throws Exception {
init("some t<caret>ext\n" +
"some texts\n" +
@@ -182,6 +206,10 @@ public class SelectUnselectOccurrenceActionsTest extends LightPlatformCodeInsigh
}
private void executeReverseAction() {
- myFixture.performEditorAction(IdeActions.ACTION_UNSELECT_LAST_OCCURENCE);
+ myFixture.performEditorAction(IdeActions.ACTION_UNSELECT_PREVIOUS_OCCURENCE);
+ }
+
+ private void executeSelectAllAction() {
+ myFixture.performEditorAction(IdeActions.ACTION_SELECT_ALL_OCCURRENCES);
}
}