diff options
| author | Kevin Newton <kddnewton@gmail.com> | 2023-10-11 11:12:41 -0400 |
|---|---|---|
| committer | Kevin Newton <kddnewton@gmail.com> | 2023-10-13 15:31:30 -0400 |
| commit | d6424453dbb8cd2794e22a7d3ba400732e709ec2 (patch) | |
| tree | 0f74de41136def37a174d19fa72ee68244422346 /test | |
| parent | 24768d8a5786fe801b346b690a43bf256a380835 (diff) | |
[ruby/prism] Enable remaining heredoc unescape tests
https://github.com/ruby/prism/commit/c7ea4941c5
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], |
