Skip to content

Commit 36ee0c1

Browse files
committed
Add tests for alias locations with special variables $`, $', and $+
1 parent 1ce10f3 commit 36ee0c1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/ruby/test_ast.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,6 +1570,15 @@ def test_valias_locations
15701570

15711571
node = ast_parse("alias $foo $&")
15721572
assert_locations(node.children[-1].locations, [[1, 0, 1, 13], [1, 0, 1, 5]])
1573+
1574+
node = ast_parse("alias $foo $`")
1575+
assert_locations(node.children[-1].locations, [[1, 0, 1, 13], [1, 0, 1, 5]])
1576+
1577+
node = ast_parse("alias $foo $'")
1578+
assert_locations(node.children[-1].locations, [[1, 0, 1, 13], [1, 0, 1, 5]])
1579+
1580+
node = ast_parse("alias $foo $+")
1581+
assert_locations(node.children[-1].locations, [[1, 0, 1, 13], [1, 0, 1, 5]])
15731582
end
15741583

15751584
def test_when_locations

0 commit comments

Comments
 (0)