mirror of
https://github.com/golang/go.git
synced 2025-05-23 08:21:24 +00:00
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 #18929 Updates #33538 Change-Id: I2d25c139d007f8db1091b7a48b1dd20c584e2699 Reviewed-on: https://go-review.googlesource.com/c/go/+/190523 Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
parent
4983a0b75b
commit
bb5441de48
5
src/cmd/gofmt/testdata/import.golden
vendored
5
src/cmd/gofmt/testdata/import.golden
vendored
@ -8,6 +8,11 @@ import (
|
||||
"math"
|
||||
)
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
)
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
|
3
src/cmd/gofmt/testdata/import.input
vendored
3
src/cmd/gofmt/testdata/import.input
vendored
@ -8,6 +8,9 @@ import (
|
||||
"io"
|
||||
)
|
||||
|
||||
import("fmt"
|
||||
"math")
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user