diff options
Diffstat (limited to 'libgo/go/cmd/go/internal/modload/import_test.go')
-rw-r--r-- | libgo/go/cmd/go/internal/modload/import_test.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libgo/go/cmd/go/internal/modload/import_test.go b/libgo/go/cmd/go/internal/modload/import_test.go index c6ade5d17f4..accc60eecdf 100644 --- a/libgo/go/cmd/go/internal/modload/import_test.go +++ b/libgo/go/cmd/go/internal/modload/import_test.go @@ -21,7 +21,7 @@ var importTests = []struct { }, { path: "golang.org/x/net", - err: "module golang.org/x/net@.* found, but does not contain package golang.org/x/net", + err: `module golang.org/x/net@.* found \(v0.0.0-.*\), but does not contain package golang.org/x/net`, }, { path: "golang.org/x/text", @@ -44,6 +44,10 @@ var importTests = []struct { func TestImport(t *testing.T) { testenv.MustHaveExternalNetwork(t) testenv.MustHaveExecPath(t, "git") + defer func(old bool) { + allowMissingModuleImports = old + }(allowMissingModuleImports) + AllowMissingModuleImports() for _, tt := range importTests { t.Run(strings.ReplaceAll(tt.path, "/", "_"), func(t *testing.T) { |