mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Move plain text-specific part of EnterActionTest to platform-tests module
GitOrigin-RevId: 732eae92ffc94e0c792f7b263ffe0415cdeb0225
This commit is contained in:
committed by
intellij-monorepo-bot
parent
419c0d24cb
commit
6843b8a3f1
@@ -0,0 +1,4 @@
|
||||
text text text
|
||||
text text text<caret>
|
||||
text text
|
||||
text tetetetetet
|
||||
@@ -0,0 +1,5 @@
|
||||
text text text
|
||||
text text text
|
||||
<caret>
|
||||
text text
|
||||
text tetetetetet
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
// 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 com.intellij.testFramework.PlatformTestUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class PlainTextEnterActionTest extends AbstractEnterActionTestCase {
|
||||
@NotNull
|
||||
@Override
|
||||
protected String getTestDataPath() {
|
||||
return PlatformTestUtil.getPlatformTestDataPath();
|
||||
}
|
||||
|
||||
public void testEnterInTextFile() throws Exception {
|
||||
doTest("txt");
|
||||
}
|
||||
|
||||
public void testEnterWithSpacesAfterCaret() {
|
||||
doTextTest("txt", "abc <caret> ", "abc \n<caret> ");
|
||||
}
|
||||
|
||||
public void testSCR2236() {
|
||||
doTextTest("txt", "//file/text/<caret>text/text", "//file/text/\n" + "<caret>text/text");
|
||||
}
|
||||
|
||||
public void testUnmatchedBraceAtPlainTextFile() {
|
||||
// Inspired by IDEA-64060
|
||||
doTextTest(
|
||||
"txt",
|
||||
" class Foo {<caret>",
|
||||
" class Foo {\n" +
|
||||
" <caret>\n" +
|
||||
" }"
|
||||
);
|
||||
}
|
||||
|
||||
public void testInJavaDocLikeStringOfPlainTextFile() {
|
||||
// Inspired by IDEA-65108
|
||||
doTextTest(
|
||||
"txt",
|
||||
"Here is a list of bullet points:\n" +
|
||||
"* Bullet one. <caret>Bullet two.",
|
||||
"Here is a list of bullet points:\n" +
|
||||
"* Bullet one. \n" +
|
||||
"<caret>Bullet two."
|
||||
);
|
||||
}
|
||||
|
||||
public void testIndentCalculationWithTabsInIndent() {
|
||||
doTextTest("txt", "\t<caret>\tabc", "\t\n\t<caret>\tabc");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user