summaryrefslogtreecommitdiff
path: root/libgo/go/cmd/go/testdata/script/mod_get_commit.txt
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/cmd/go/testdata/script/mod_get_commit.txt')
-rw-r--r--libgo/go/cmd/go/testdata/script/mod_get_commit.txt19
1 files changed, 10 insertions, 9 deletions
diff --git a/libgo/go/cmd/go/testdata/script/mod_get_commit.txt b/libgo/go/cmd/go/testdata/script/mod_get_commit.txt
index 4649491a532..f60eaab3a77 100644
--- a/libgo/go/cmd/go/testdata/script/mod_get_commit.txt
+++ b/libgo/go/cmd/go/testdata/script/mod_get_commit.txt
@@ -5,18 +5,18 @@ env GO111MODULE=on
# golang.org/x/text/language@commit should resolve.
# Because of -d, the compiler should not run.
-go get -d -x golang.org/x/text/language@14c0d48
+go get -x golang.org/x/text/language@14c0d48
! stderr 'compile|cp|gccgo .*language\.a$'
# go get should skip build with no Go files in root
-go get -d golang.org/x/text@14c0d48
+go get golang.org/x/text@14c0d48
# dropping -d, we should see a build.
[short] skip
env GOCACHE=$WORK/gocache # Looking for compile commands, so need a clean cache.
-go get -x golang.org/x/text/language@14c0d48
+go build -x golang.org/x/text/language
stderr 'compile|cp|gccgo .*language\.a$'
# BUG: after the build, the package should not be stale, as 'go install' would
@@ -24,19 +24,20 @@ stderr 'compile|cp|gccgo .*language\.a$'
go list -f '{{.Stale}}' golang.org/x/text/language
stdout ^true
-# install after get should not run the compiler again.
+# install after build should not run the compiler again.
go install -x golang.org/x/text/language
! stderr 'compile|cp|gccgo .*language\.a$'
-# even with -d, we should see an error for unknown packages.
-! go get -d -x golang.org/x/text/foo@14c0d48
+# we should see an error for unknown packages.
+! go get -x golang.org/x/text/foo@14c0d48
+stderr '^go: module golang.org/x/text@14c0d48 found \(v0.3.0\), but does not contain package golang.org/x/text/foo$'
# get pseudo-version should record that version
-go get -d rsc.io/quote@v0.0.0-20180214005840-23179ee8a569
+go get rsc.io/quote@v0.0.0-20180214005840-23179ee8a569
grep 'rsc.io/quote v0.0.0-20180214005840-23179ee8a569' go.mod
# but as commit should record as v1.5.1
-go get -d rsc.io/quote@23179ee8
+go get rsc.io/quote@23179ee8
grep 'rsc.io/quote v1.5.1' go.mod
# go mod edit -require does not interpret commits
@@ -44,7 +45,7 @@ go mod edit -require rsc.io/quote@23179ee
grep 'rsc.io/quote 23179ee' go.mod
# but other commands fix them
-go mod graph
+go list -m -mod=mod all
grep 'rsc.io/quote v1.5.1' go.mod
-- go.mod --