From feac2b4b77b337a637d80793c53b680e5697cab6 Mon Sep 17 00:00:00 2001 From: ydah Date: Sun, 22 Sep 2024 00:13:16 +0900 Subject: Implement CASE NODE keyword locations --- test/ruby/test_ast.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_ast.rb b/test/ruby/test_ast.rb index 79077603e4..068b372ff9 100644 --- a/test/ruby/test_ast.rb +++ b/test/ruby/test_ast.rb @@ -1353,6 +1353,11 @@ dummy assert_locations(node.children[-1].children[-1].children[-1].locations, [[1, 7, 1, 14], [1, 7, 1, 12]]) end + def test_case_locations + node = ast_parse("case a; when 1; end") + assert_locations(node.children[-1].locations, [[1, 0, 1, 19], [1, 0, 1, 4], [1, 16, 1, 19]]) + 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]]) -- cgit v1.2.3