diff --git a/compiler/testData/psi/BackslashInString.kt b/compiler/testData/psi/BackslashInString.kt new file mode 100644 index 00000000000..b39bb2c32b5 --- /dev/null +++ b/compiler/testData/psi/BackslashInString.kt @@ -0,0 +1,3 @@ +fun foo() { + "\ +} diff --git a/compiler/testData/psi/BackslashInString.txt b/compiler/testData/psi/BackslashInString.txt new file mode 100644 index 00000000000..c652e0c4faa --- /dev/null +++ b/compiler/testData/psi/BackslashInString.txt @@ -0,0 +1,22 @@ +JetFile: BackslashInString.kt + PACKAGE_DIRECTIVE + + FUN + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('foo') + VALUE_PARAMETER_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + BLOCK + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + STRING_TEMPLATE + PsiElement(OPEN_QUOTE)('"') + PsiErrorElement:Unexpected token in a string template + PsiElement(BAD_CHARACTER)('\') + PsiErrorElement:Expecting '"' + + PsiWhiteSpace('\n') + PsiElement(RBRACE)('}') \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/jet/parsing/JetParsingTestGenerated.java b/compiler/tests/org/jetbrains/jet/parsing/JetParsingTestGenerated.java index b170b9bcb3c..5354505a960 100644 --- a/compiler/tests/org/jetbrains/jet/parsing/JetParsingTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/parsing/JetParsingTestGenerated.java @@ -84,6 +84,11 @@ public class JetParsingTestGenerated extends AbstractJetParsingTest { doParsingTest("compiler/testData/psi/BabySteps_ERR.kt"); } + @TestMetadata("BackslashInString.kt") + public void testBackslashInString() throws Exception { + doParsingTest("compiler/testData/psi/BackslashInString.kt"); + } + @TestMetadata("BlockCommentAtBeginningOfFile1.kt") public void testBlockCommentAtBeginningOfFile1() throws Exception { doParsingTest("compiler/testData/psi/BlockCommentAtBeginningOfFile1.kt");