diff options
Diffstat (limited to 'platform/platform-tests/testSrc/com/intellij/openapi/editor/EditorMultiCaretTest.java')
-rw-r--r-- | platform/platform-tests/testSrc/com/intellij/openapi/editor/EditorMultiCaretTest.java | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/editor/EditorMultiCaretTest.java b/platform/platform-tests/testSrc/com/intellij/openapi/editor/EditorMultiCaretTest.java index 26be81d2f341..fdaf7c6ed5b0 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/editor/EditorMultiCaretTest.java +++ b/platform/platform-tests/testSrc/com/intellij/openapi/editor/EditorMultiCaretTest.java @@ -245,6 +245,38 @@ public class EditorMultiCaretTest extends AbstractEditorTest { "seven<caret>"); } + public void testCopyMultilineFromOneCaretPasteIntoTwo() throws Exception { + init("<selection>one\n" + + "two<caret></selection>\n" + + "three\n" + + "four", + TestFileType.TEXT); + executeAction("EditorCopy"); + executeAction("EditorTextStart"); + executeAction("EditorCloneCaretBelow"); + executeAction("EditorPaste"); + checkResultByText("one\n" + + "two<caret>one\n" + + "one\n" + + "two<caret>two\n" + + "three\n" + + "four"); + } + + public void testCopyPasteDoesNothingWithUnevenSelection() throws Exception { + init("<selection>one\n" + + "two<caret></selection>\n" + + "<selection>three<caret></selection>\n" + + "four", + TestFileType.TEXT); + executeAction("EditorCopy"); + executeAction("EditorPaste"); + checkResultByText("one\n" + + "two<caret>\n" + + "three<caret>\n" + + "four"); + } + public void testEscapeAfterDragDown() throws Exception { init("line1\n" + "line2", |