diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/prism/snapshots/whitequark/parser_slash_slash_n_escaping_in_literals.txt | 2 | ||||
| -rw-r--r-- | test/prism/unescape_test.rb | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/test/prism/snapshots/whitequark/parser_slash_slash_n_escaping_in_literals.txt b/test/prism/snapshots/whitequark/parser_slash_slash_n_escaping_in_literals.txt index ad38f53cee..20496c3cfc 100644 --- a/test/prism/snapshots/whitequark/parser_slash_slash_n_escaping_in_literals.txt +++ b/test/prism/snapshots/whitequark/parser_slash_slash_n_escaping_in_literals.txt @@ -114,7 +114,7 @@ │ ├── opening_loc: (51,0)-(51,9) = "<<-'HERE'" │ ├── content_loc: (52,0)-(53,0) = "a\\\nb\n" │ ├── closing_loc: (54,0)-(54,0) = "HERE\n" - │ └── unescaped: "ab\n" + │ └── unescaped: "a\\\nb\n" ├── @ XStringNode (location: (56,0)-(56,9)) │ ├── opening_loc: (56,0)-(56,9) = "<<-`HERE`" │ ├── content_loc: (57,0)-(58,0) = "a\\\nb\n" diff --git a/test/prism/unescape_test.rb b/test/prism/unescape_test.rb index d431fe9afd..de4d1bf1b9 100644 --- a/test/prism/unescape_test.rb +++ b/test/prism/unescape_test.rb @@ -102,6 +102,14 @@ module Prism [Context::String.new("%[", "]"), escapes], [Context::String.new("`", "`"), escapes], [Context::String.new("%x[", "]"), escapes], + [Context::String.new("<<H\n", "\nH"), escapes], + [Context::String.new("<<'H'\n", "\nH"), escapes], + [Context::String.new("<<\"H\"\n", "\nH"), escapes], + [Context::String.new("<<`H`\n", "\nH"), escapes], + [Context::String.new("<<-H\n", "\nH"), escapes], + [Context::String.new("<<-'H'\n", "\nH"), escapes], + [Context::String.new("<<-\"H\"\n", "\nH"), escapes], + [Context::String.new("<<-`H`\n", "\nH"), escapes], # [Context::String.new("<<~H\n", "\nH"), escapes], # [Context::String.new("<<~'H'\n", "\nH"), escapes], # [Context::String.new("<<~\"H\"\n", "\nH"), escapes], |
