summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorydah <[email protected]>2024-09-22 00:22:59 +0900
committerYuichiro Kaneko <[email protected]>2024-09-23 09:19:37 +0900
commitb811a9a097f2ce9ed9b200be84523698bc693e54 (patch)
tree86d1e684b4b6915a8b9d3eddf35bffaac4961d3b /test/ruby
parent5334766bebcb471549b300c6e6e9cf0d08575116 (diff)
Implement CASE3 NODE keyword locations
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11661
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_ast.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_ast.rb b/test/ruby/test_ast.rb
index f2024b2900..06fb3c56c0 100644
--- a/test/ruby/test_ast.rb
+++ b/test/ruby/test_ast.rb
@@ -1363,6 +1363,11 @@ dummy
assert_locations(node.children[-1].locations, [[1, 0, 1, 17], [1, 0, 1, 4], [1, 14, 1, 17]])
end
+ def test_case3_locations
+ node = ast_parse("case a; in 1; end")
+ assert_locations(node.children[-1].locations, [[1, 0, 1, 17], [1, 0, 1, 4], [1, 14, 1, 17]])
+ end
+
def test_next_locations
node = ast_parse("loop { next 1 }")
assert_locations(node.children[-1].children[-1].children[-1].locations, [[1, 7, 1, 13], [1, 7, 1, 11]])