From a4f140b0f3fa0e1fcedb2c8472e5bb6cbf051684 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 22 Aug 2018 13:22:06 +0300 Subject: no escape --- crates/libsyntax2/tests/data/lexer/0009_strings.rs | 3 ++- crates/libsyntax2/tests/data/lexer/0009_strings.txt | 4 ++++ crates/libsyntax2/tests/data/lexer/0014_unclosed_char.rs | 1 + crates/libsyntax2/tests/data/lexer/0014_unclosed_char.txt | 1 + crates/libsyntax2/tests/data/lexer/0015_unclosed_string.rs | 1 + crates/libsyntax2/tests/data/lexer/0015_unclosed_string.txt | 1 + 6 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 crates/libsyntax2/tests/data/lexer/0014_unclosed_char.rs create mode 100644 crates/libsyntax2/tests/data/lexer/0014_unclosed_char.txt create mode 100644 crates/libsyntax2/tests/data/lexer/0015_unclosed_string.rs create mode 100644 crates/libsyntax2/tests/data/lexer/0015_unclosed_string.txt (limited to 'crates/libsyntax2/tests') diff --git a/crates/libsyntax2/tests/data/lexer/0009_strings.rs b/crates/libsyntax2/tests/data/lexer/0009_strings.rs index 7b7faa5d8..4ddb5bffc 100644 --- a/crates/libsyntax2/tests/data/lexer/0009_strings.rs +++ b/crates/libsyntax2/tests/data/lexer/0009_strings.rs @@ -1 +1,2 @@ -"hello" r"world" +"hello" r"world" "\n\"\\no escape" "multi +line" diff --git a/crates/libsyntax2/tests/data/lexer/0009_strings.txt b/crates/libsyntax2/tests/data/lexer/0009_strings.txt index 7fb6b7b36..4cb4d711d 100644 --- a/crates/libsyntax2/tests/data/lexer/0009_strings.txt +++ b/crates/libsyntax2/tests/data/lexer/0009_strings.txt @@ -1,4 +1,8 @@ STRING 7 "\"hello\"" WHITESPACE 1 " " RAW_STRING 8 "r\"world\"" +WHITESPACE 1 " " +STRING 17 "\"\\n\\\"\\\\no escape\"" +WHITESPACE 1 " " +STRING 12 "\"multi\nline\"" WHITESPACE 1 "\n" diff --git a/crates/libsyntax2/tests/data/lexer/0014_unclosed_char.rs b/crates/libsyntax2/tests/data/lexer/0014_unclosed_char.rs new file mode 100644 index 000000000..9c0007077 --- /dev/null +++ b/crates/libsyntax2/tests/data/lexer/0014_unclosed_char.rs @@ -0,0 +1 @@ +'1 \ No newline at end of file diff --git a/crates/libsyntax2/tests/data/lexer/0014_unclosed_char.txt b/crates/libsyntax2/tests/data/lexer/0014_unclosed_char.txt new file mode 100644 index 000000000..812dfbc18 --- /dev/null +++ b/crates/libsyntax2/tests/data/lexer/0014_unclosed_char.txt @@ -0,0 +1 @@ +CHAR 2 "\'1" diff --git a/crates/libsyntax2/tests/data/lexer/0015_unclosed_string.rs b/crates/libsyntax2/tests/data/lexer/0015_unclosed_string.rs new file mode 100644 index 000000000..d771a26d4 --- /dev/null +++ b/crates/libsyntax2/tests/data/lexer/0015_unclosed_string.rs @@ -0,0 +1 @@ +"hello diff --git a/crates/libsyntax2/tests/data/lexer/0015_unclosed_string.txt b/crates/libsyntax2/tests/data/lexer/0015_unclosed_string.txt new file mode 100644 index 000000000..728c40b66 --- /dev/null +++ b/crates/libsyntax2/tests/data/lexer/0015_unclosed_string.txt @@ -0,0 +1 @@ +STRING 7 "\"hello\n" -- cgit v1.2.3