mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java, inspections, test] Add a test with escaping IDEA-323918
GitOrigin-RevId: 8854a560b9b4d455a6d28cf22ec03437918a8eae
This commit is contained in:
committed by
intellij-monorepo-bot
parent
16be8ae189
commit
d3f9b07ae2
+17
@@ -237,6 +237,23 @@ public class StringTemplateMigrationInspectionTest extends LightJavaCodeInsightF
|
||||
}""");
|
||||
}
|
||||
|
||||
public void testEscapeChars() {
|
||||
doTest("""
|
||||
class StringTemplateMigration {
|
||||
void test() {
|
||||
int quote = "\\"";
|
||||
System.out.println(quote <caret> + "\\n \\\\ \\" \\t \\b \\r \\f \\' \\u00A9" + quote);
|
||||
}
|
||||
}""", """
|
||||
class StringTemplateMigration {
|
||||
void test() {
|
||||
int quote = "\\"";
|
||||
System.out.println(STR."\\{quote}\\n \\\\ \\" \\t \\b \\r \\f \\' \\u00A9\\{quote}");
|
||||
}
|
||||
}""");
|
||||
}
|
||||
|
||||
|
||||
private void doTest(@NotNull @Language("Java") String before, @NotNull @Language("Java") String after) {
|
||||
myFixture.configureByText("Template.java", before);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user