IDEA-159341

Replace in file: Regex for start of line matches twice on empty lines
This commit is contained in:
Maxim.Mossienko
2016-09-14 13:26:54 +02:00
parent 91f2aea46f
commit 7b5b5f20d6
2 changed files with 9 additions and 0 deletions
@@ -927,6 +927,14 @@ public class FindManagerTest extends DaemonAnalyzerTestCase {
assertSize(2, findUsages(findModel));
}
public void testProperHandlingOfEmptyLinesWhenReplacingWithRegExp() throws Exception {
doTestRegexpReplace(
"foo\n\n\n",
"^",
"// ",
"// foo\n// \n// \n");
}
private void runAsyncTest(String text, FindModel findModel) throws InterruptedException {
final Ref<FindResult> result = new Ref<>();
final CountDownLatch progressStarted = new CountDownLatch(1);