summaryrefslogtreecommitdiff
path: root/libgo/go/cmd/go/testdata/script/mod_file_proxy.txt
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/cmd/go/testdata/script/mod_file_proxy.txt')
-rw-r--r--libgo/go/cmd/go/testdata/script/mod_file_proxy.txt25
1 files changed, 25 insertions, 0 deletions
diff --git a/libgo/go/cmd/go/testdata/script/mod_file_proxy.txt b/libgo/go/cmd/go/testdata/script/mod_file_proxy.txt
new file mode 100644
index 00000000000..8de6d7dbb88
--- /dev/null
+++ b/libgo/go/cmd/go/testdata/script/mod_file_proxy.txt
@@ -0,0 +1,25 @@
+# Allow (cached) downloads for -mod=readonly.
+env GO111MODULE=on
+env GOPATH=$WORK/gopath1
+cd $WORK/x
+go mod edit -fmt
+go list -mod=readonly
+env GOPROXY=file:///nonexist
+go list
+grep v1.5.1 $GOPATH/pkg/mod/cache/download/rsc.io/quote/@v/list
+
+# Use download cache as file:/// proxy.
+[windows] stop # TODO: file://$WORK puts backslashes in the URL
+env GOPATH=$WORK/gopath2
+env GOPROXY=file:///nonexist
+! go list
+env GOPROXY=file://$WORK/gopath1/pkg/mod/cache/download
+go list
+grep v1.5.1 $GOPATH/pkg/mod/cache/download/rsc.io/quote/@v/list
+
+-- $WORK/x/go.mod --
+module x
+require rsc.io/quote v1.5.1
+-- $WORK/x/x.go --
+package x
+import _ "rsc.io/quote"