Add tests for alias locations with special variables $`, $', and $+

This commit is contained in:
ydah 2025-03-03 00:14:25 +09:00 committed by Yudai Takada
parent 1ce10f3fbb
commit 36ee0c1acb
Notes: git 2025-03-05 09:21:37 +00:00

View File

@ -1570,6 +1570,15 @@ dummy
node = ast_parse("alias $foo $&")
assert_locations(node.children[-1].locations, [[1, 0, 1, 13], [1, 0, 1, 5]])
node = ast_parse("alias $foo $`")
assert_locations(node.children[-1].locations, [[1, 0, 1, 13], [1, 0, 1, 5]])
node = ast_parse("alias $foo $'")
assert_locations(node.children[-1].locations, [[1, 0, 1, 13], [1, 0, 1, 5]])
node = ast_parse("alias $foo $+")
assert_locations(node.children[-1].locations, [[1, 0, 1, 13], [1, 0, 1, 5]])
end
def test_when_locations