diff options
Diffstat (limited to 'libgo/go/cmd/go/testdata/script/mod_fs_patterns.txt')
-rw-r--r-- | libgo/go/cmd/go/testdata/script/mod_fs_patterns.txt | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/libgo/go/cmd/go/testdata/script/mod_fs_patterns.txt b/libgo/go/cmd/go/testdata/script/mod_fs_patterns.txt index fd7de130024..4911fbb6138 100644 --- a/libgo/go/cmd/go/testdata/script/mod_fs_patterns.txt +++ b/libgo/go/cmd/go/testdata/script/mod_fs_patterns.txt @@ -1,7 +1,6 @@ -# File system pattern searches should skip sub-modules and vendor directories. - env GO111MODULE=on +# File system pattern searches should skip sub-modules and vendor directories. cd x # all packages @@ -40,6 +39,24 @@ stderr '^can.t load package: package ./nonexist: cannot find package "." in:\n\t ! stderr 'import lookup disabled' stderr 'can.t load package: package ./go.mod: cannot find package' + +# File system paths and patterns should allow the '@' character. +cd ../@at +go list $PWD +stdout '^at$' +go list $PWD/... +stdout '^at$' + +# The '@' character is not allowed in directory paths that are part of +# a package path. +cd ../badat/bad@ +! go list . +stderr 'directory . outside available modules' +! go list $PWD +stderr 'directory . outside available modules' +! go list $PWD/... +stderr 'directory . outside available modules' + -- x/go.mod -- module m @@ -64,3 +81,17 @@ package z -- x/y/z/w/w.go -- package w + +-- @at/go.mod -- +module at + +go 1.14 +-- @at/at.go -- +package at + +-- badat/go.mod -- +module badat + +go 1.14 +-- badat/bad@/bad.go -- +package bad |