]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/gofmt: update TestRewrite to avoid future regressions
authorJoe Tsai <joetsai@digital-static.net>
Fri, 16 Aug 2019 17:42:18 +0000 (10:42 -0700)
committerJoe Tsai <thebrokentoaster@gmail.com>
Fri, 16 Aug 2019 19:54:55 +0000 (19:54 +0000)
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>
src/cmd/gofmt/testdata/import.golden
src/cmd/gofmt/testdata/import.input

index 51d7be79dfab7aea7bec5c32fd02b6fdefebafec..29bdc9baf4a637763fc75e30086dca99acd500f2 100644 (file)
@@ -8,6 +8,11 @@ import (
        "math"
 )
 
+import (
+       "fmt"
+       "math"
+)
+
 import (
        "fmt"
 
index 9a4b09dbf9108ca8cd642e122a340887dee79b46..78ab4f654434a7e6e5d74eb958e647dce5e506fb 100644 (file)
@@ -8,6 +8,9 @@ import (
        "io"
 )
 
+import("fmt"
+"math")
+
 import (
        "fmt"