diff options
| author | Kevin Newton <kddnewton@gmail.com> | 2023-08-14 13:58:24 -0400 |
|---|---|---|
| committer | Takashi Kokubun <takashikkbn@gmail.com> | 2023-08-16 17:47:32 -0700 |
| commit | 957cd369fa38915241e0b66e852f66ac516de664 (patch) | |
| tree | 50188eadaba3c1eec43f5872669e73e02ea375ec | |
| parent | 3536cad9022e1f4fc6e6fd3d629de005e7c3342a (diff) | |
[ruby/yarp] Add test for empty heredoc
https://github.com/ruby/yarp/commit/e49b63a79e
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/8226
| -rw-r--r-- | test/yarp/fixtures/dash_heredocs.txt | 3 | ||||
| -rw-r--r-- | test/yarp/snapshots/dash_heredocs.txt | 13 |
2 files changed, 10 insertions, 6 deletions
diff --git a/test/yarp/fixtures/dash_heredocs.txt b/test/yarp/fixtures/dash_heredocs.txt index a05df93023..aba782c99a 100644 --- a/test/yarp/fixtures/dash_heredocs.txt +++ b/test/yarp/fixtures/dash_heredocs.txt @@ -39,6 +39,9 @@ EOF b EOF +<<-'' + + <<-'EOF' a #{1} EOF diff --git a/test/yarp/snapshots/dash_heredocs.txt b/test/yarp/snapshots/dash_heredocs.txt index bc4c90a76f..ad79c46251 100644 --- a/test/yarp/snapshots/dash_heredocs.txt +++ b/test/yarp/snapshots/dash_heredocs.txt @@ -1,6 +1,6 @@ -ProgramNode(0...223)( +ProgramNode(0...231)( [], - StatementsNode(0...223)( + StatementsNode(0...231)( [InterpolatedStringNode(0...15)( (0...6), [StringNode(7...11)(nil, (7...11), nil, " a\n")], @@ -112,10 +112,11 @@ ProgramNode(0...223)( [StringNode(188...196)(nil, (188...196), nil, " a\n" + " b\n")], (196...200) ), - InterpolatedStringNode(201...223)( - (201...209), - [StringNode(210...219)(nil, (210...219), nil, " a \#{1}\n")], - (219...223) + InterpolatedStringNode(201...208)((201...206), [], (207...208)), + InterpolatedStringNode(209...231)( + (209...217), + [StringNode(218...227)(nil, (218...227), nil, " a \#{1}\n")], + (227...231) )] ) ) |
