diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/cmd/go/testdata/mod/golang.org_x_net_v0.1.0.txt | 10 | ||||
| -rw-r--r-- | src/cmd/go/testdata/script/get_panic_issue75251.txt | 2 | ||||
| -rw-r--r-- | src/cmd/go/testdata/script/list_std_vendor.txt | 29 |
3 files changed, 37 insertions, 4 deletions
diff --git a/src/cmd/go/testdata/mod/golang.org_x_net_v0.1.0.txt b/src/cmd/go/testdata/mod/golang.org_x_net_v0.1.0.txt new file mode 100644 index 0000000000..66904b6c3f --- /dev/null +++ b/src/cmd/go/testdata/mod/golang.org_x_net_v0.1.0.txt @@ -0,0 +1,10 @@ +written by hand - just enough for list_std_vendor.txt + +-- .mod -- +module golang.org/x/net +-- .info -- +{"Version":"v0.1.0","Name":"","Short":"","Time":"2026-03-08T00:00:00Z"} +-- go.mod -- +module golang.org/x/net +-- dns/dnsmessage/dnsmessage.go -- +package dnsmessage diff --git a/src/cmd/go/testdata/script/get_panic_issue75251.txt b/src/cmd/go/testdata/script/get_panic_issue75251.txt index 2cc3f3a9c4..00d019f865 100644 --- a/src/cmd/go/testdata/script/get_panic_issue75251.txt +++ b/src/cmd/go/testdata/script/get_panic_issue75251.txt @@ -5,7 +5,7 @@ go mod init m ! go get golang.org/x/net/http/httpguts˙v0.43.0 # contains 0xff byte ! stderr panic -stderr 'malformed module path' +stderr 'module golang.org/x/net@upgrade found.*but does not contain package golang.org/x/net/http/httpguts.v0.43.0' ! go get golang.org/x/net/http/httpguts˙@v0.43.0 # contains 0xff byte ! stderr panic diff --git a/src/cmd/go/testdata/script/list_std_vendor.txt b/src/cmd/go/testdata/script/list_std_vendor.txt index 834babe674..06674ff41e 100644 --- a/src/cmd/go/testdata/script/list_std_vendor.txt +++ b/src/cmd/go/testdata/script/list_std_vendor.txt @@ -2,6 +2,8 @@ # dependencies regardless of whether they are listed from within or outside # GOROOT/src. +env GOROOT=$WORK/goroot + # Control case: net, viewed from outside the 'std' module, # should depend on vendor/golang.org/… instead of golang.org/…. @@ -25,9 +27,30 @@ cmp stdout $WORK/net-deps.txt # However, 'go mod' and 'go get' subcommands should report the original module # dependencies, not the vendored packages. -[!net:golang.org] stop - -env GOPROXY= env GOWORK=off go mod why -m golang.org/x/net stdout '^# golang.org/x/net\nnet\ngolang.org/x/net' + +-- $WORK/goroot/src/go.mod -- +module std + +go 1.26 + +require golang.org/x/net v0.1.0 +-- $WORK/goroot/src/go.sum -- +golang.org/x/net v0.1.0 h1:iUcD2VNMwNi3BZMUg2qIGo4aAass7E0R4eQNGK3hvc0= +golang.org/x/net v0.1.0/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +-- $WORK/goroot/src/vendor/modules.txt -- +# golang.org/x/net v0.1.0 +## explicit +golang.org/x/net/dns/dnsmessage +-- $WORK/goroot/src/vendor/modules.txt -- +# golang.org/x/net v0.1.0 +## explicit +golang.org/x/net/dns/dnsmessage +-- $WORK/goroot/src/vendor/golang.org/x/net/dns/dnsmessage/dnsmessage.go -- +package dnsmessage +-- $WORK/goroot/src/net/net.go -- +package net + +import _ "golang.org/x/net/dns/dnsmessage" |
