Skip to content

Commit bb5441d

Browse files
committed
cmd/gofmt: update TestRewrite to avoid future regressions
CL 162337 changed go/ast to better handle block comments, but was reverted because it introduced an off-by-one bug. This CL adds a test case to enforce the correct behavior so that future changes do not break this again. Updates golang#18929 Updates golang#33538 Change-Id: I2d25c139d007f8db1091b7a48b1dd20c584e2699 Reviewed-on: https://go-review.googlesource.com/c/go/+/190523 Run-TryBot: Joe Tsai <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Robert Griesemer <[email protected]>
1 parent 4983a0b commit bb5441d

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

src/cmd/gofmt/testdata/import.golden

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ import (
88
"math"
99
)
1010

11+
import (
12+
"fmt"
13+
"math"
14+
)
15+
1116
import (
1217
"fmt"
1318

src/cmd/gofmt/testdata/import.input

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ import (
88
"io"
99
)
1010

11+
import("fmt"
12+
"math")
13+
1114
import (
1215
"fmt"
1316

0 commit comments

Comments
 (0)