diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/prism/constant_path_node_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/prism/constant_path_node_test.rb b/test/prism/constant_path_node_test.rb index 9842be0c49..aeab6e01e9 100644 --- a/test/prism/constant_path_node_test.rb +++ b/test/prism/constant_path_node_test.rb @@ -52,5 +52,16 @@ module Prism node = Prism.parse(source).value.statements.body.first assert_equal("Foo::Bar::Baz::Qux", node.lefts.first.full_name) end + + def test_full_name_for_constant_path_with_stovetop_start + source = <<~RUBY + ::Foo:: # comment + Bar::Baz:: + Qux, Something = [1, 2] + RUBY + + node = Prism.parse(source).value.statements.body.first + assert_equal("::Foo::Bar::Baz::Qux", node.lefts.first.full_name) + end end end |
