diff options
| author | Mike Dalessio <mike.dalessio@gmail.com> | 2023-08-19 22:18:43 -0400 |
|---|---|---|
| committer | Jemma Issroff <jemmaissroff@gmail.com> | 2023-08-21 10:43:25 -0700 |
| commit | 2cecd3c8c1c62158d44c86fe782780394b227f24 (patch) | |
| tree | e3d299b2209c2996bac2ceee966f0720fbc378ed /test | |
| parent | 9ca547b9fe8fd98b73184fffead1b2a44c37b4c5 (diff) | |
[ruby/yarp] fix: newline tracking for nl-terminated % %q %Q
https://github.com/ruby/yarp/commit/1e4940864b
Diffstat (limited to 'test')
| -rw-r--r-- | test/yarp/fixtures/newline_terminated.txt | 11 | ||||
| -rw-r--r-- | test/yarp/snapshots/newline_terminated.txt | 15 |
2 files changed, 23 insertions, 3 deletions
diff --git a/test/yarp/fixtures/newline_terminated.txt b/test/yarp/fixtures/newline_terminated.txt index 27e7c62e8e..3faf45ab4a 100644 --- a/test/yarp/fixtures/newline_terminated.txt +++ b/test/yarp/fixtures/newline_terminated.txt @@ -1,2 +1,13 @@ +# note that %i, %I, %w, and %W do not support newline termination in CRuby + +% +foo + +%q +foo + +%Q +foo + %r foo diff --git a/test/yarp/snapshots/newline_terminated.txt b/test/yarp/snapshots/newline_terminated.txt index e68ea1658e..946eb44a36 100644 --- a/test/yarp/snapshots/newline_terminated.txt +++ b/test/yarp/snapshots/newline_terminated.txt @@ -1,6 +1,15 @@ -ProgramNode(0...7)( +ProgramNode(76...106)( [], - StatementsNode(0...7)( - [RegularExpressionNode(0...7)((0...3), (3...6), (6...7), "foo", 0)] + StatementsNode(76...106)( + [StringNode(76...82)((76...78), (78...81), (81...82), "foo"), + StringNode(83...90)((83...86), (86...89), (89...90), "foo"), + StringNode(91...98)((91...94), (94...97), (97...98), "foo"), + RegularExpressionNode(99...106)( + (99...102), + (102...105), + (105...106), + "foo", + 0 + )] ) ) |
