From 7dbb7459213a2c348843057053672f413100938e Mon Sep 17 00:00:00 2001 From: Alexey Pegov Date: Tue, 6 Sep 2011 09:55:39 +0400 Subject: [PATCH] _testStringBeforeAnotherStringShouldNotIncreaseIndentOfTheFollowingString --- .../BlockIndentOnPasteTest.groovy | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/editorActions/BlockIndentOnPasteTest.groovy b/java/java-tests/testSrc/com/intellij/codeInsight/editorActions/BlockIndentOnPasteTest.groovy index 6375b31c67af..eb43d1c08517 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/editorActions/BlockIndentOnPasteTest.groovy +++ b/java/java-tests/testSrc/com/intellij/codeInsight/editorActions/BlockIndentOnPasteTest.groovy @@ -58,6 +58,31 @@ class Test { doTest(before, toPaste, expected) } + void _testStringBeforeAnotherStringShouldNotIncreaseIndentOfTheFollowingString() { + def before = '''\ +class Test { + void test() { + int a = 100; + int b = 200; + }\ +''' + + def toPaste = '''\ + int b = 200; +''' + + def expected = '''\ +class Test { + void test() { + int b = 200; + int a = 100; + int b = 200; + }\ +''' + + doTest(before, toPaste, expected) + } + void testJavaComplexBlockWithDecreasedIndent() { def before = '''\ class Test {