aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/testdata/script/mod_outside.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/go/testdata/script/mod_outside.txt')
-rw-r--r--src/cmd/go/testdata/script/mod_outside.txt15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/cmd/go/testdata/script/mod_outside.txt b/src/cmd/go/testdata/script/mod_outside.txt
index 03ef576168..e398f7bc40 100644
--- a/src/cmd/go/testdata/script/mod_outside.txt
+++ b/src/cmd/go/testdata/script/mod_outside.txt
@@ -69,10 +69,9 @@ go clean -n
! stdout .
! stderr .
-# 'go mod graph' should not display anything, since there are no active modules.
-go mod graph
-! stdout .
-! stderr .
+# 'go mod graph' should fail, since there's no module graph.
+! go mod graph
+stderr 'cannot find main module'
# 'go mod why' should fail, since there is no main module to depend on anything.
! go mod why -m example.com/version
@@ -177,9 +176,11 @@ go doc fmt
! go doc example.com/version
stderr 'doc: cannot find module providing package example.com/version: working directory is not part of a module'
-# 'go install' with a version should fail due to syntax.
-! go install example.com/printversion@v1.0.0
-stderr 'can only use path@version syntax with'
+# 'go install' with a version should succeed if all constraints are met.
+# See mod_install_pkg_version.
+rm $GOPATH/bin
+go install example.com/printversion@v0.1.0
+exists $GOPATH/bin/printversion$GOEXE
# 'go install' should fail if a package argument must be resolved to a module.
! go install example.com/printversion