Commit 49ac23a3 authored by Bryan C. Mills's avatar Bryan C. Mills

cmd/go: convert TestFmtLoadErrors to a script test

This test failed in a pending CL, and I would rather debug it as a script.

Change-Id: I0ae7486a9949bea40d5dd36afe6919f86f14dfa7
Reviewed-on: https://go-review.googlesource.com/c/go/+/206499
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 0c703b37
...@@ -5704,14 +5704,6 @@ func TestInstallDeps(t *testing.T) { ...@@ -5704,14 +5704,6 @@ func TestInstallDeps(t *testing.T) {
tg.mustExist(p1) tg.mustExist(p1)
} }
func TestFmtLoadErrors(t *testing.T) {
tg := testgo(t)
defer tg.cleanup()
tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
tg.runFail("fmt", "does-not-exist")
tg.run("fmt", "-n", "exclude")
}
func TestGoTestMinusN(t *testing.T) { func TestGoTestMinusN(t *testing.T) {
// Intent here is to verify that 'go test -n' works without crashing. // Intent here is to verify that 'go test -n' works without crashing.
// This reuses flag_test.go, but really any test would do. // This reuses flag_test.go, but really any test would do.
......
env GO111MODULE=off
! go fmt does-not-exist
go fmt -n exclude
stdout 'exclude[/\\]x\.go'
stdout 'exclude[/\\]x_linux\.go'
-- exclude/empty/x.txt --
-- exclude/ignore/_x.go --
package x
-- exclude/x.go --
// +build linux,!linux
package x
-- exclude/x_linux.go --
// +build windows
package x
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment