Skip to content

Commit 21017b1

Browse files
committed
using test case
1 parent 4039d3b commit 21017b1

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/patch/location.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ expr_child_index(x::CSTParser.BinaryOpCall, i) = [2, 1, 3][i]
5050
expr_child_index(x::CSTParser.BinarySyntaxOpCall, i) = i+1
5151
expr_child_index(x::CSTParser.ConditionalOpCall, i) = i
5252
expr_child_index(x::EXPR{CSTParser.ChainOpCall}, i) = i == 1 ? 2 : 2(i-1)-1
53+
expr_child_index(x::EXPR{CSTParser.Using}, i) = i+1
5354

5455
function expr_child!(ii, ex, i)
5556
j = expr_child_index(ex, i)

test/patch.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ testrep(ex, text) = textmap(_ -> Expr(:file, ex), text)
1919
bar(uppercase("baz"))
2020
"""
2121

22+
@test_broken testrep(:(using Bar), "using Foo") == "using Bar"
23+
2224
# Insertion
2325

2426
@test testrep(:(f(a,b)), "f(a)") == "f(a, b)"

0 commit comments

Comments
 (0)