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:
Joe Tsai 2019-08-16 10:42:18 -07:00 committed by Joe Tsai
parent 4983a0b75b
commit bb5441de48
2 changed files with 8 additions and 0 deletions

View File

@ -8,6 +8,11 @@ import (
"math" "math"
) )
import (
"fmt"
"math"
)
import ( import (
"fmt" "fmt"

View File

@ -8,6 +8,9 @@ import (
"io" "io"
) )
import("fmt"
"math")
import ( import (
"fmt" "fmt"