diff options
Diffstat (limited to 'libgo/go/cmd/go/testdata/script/mod_internal.txt')
-rw-r--r-- | libgo/go/cmd/go/testdata/script/mod_internal.txt | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libgo/go/cmd/go/testdata/script/mod_internal.txt b/libgo/go/cmd/go/testdata/script/mod_internal.txt index 687269d18f6..787b21f379c 100644 --- a/libgo/go/cmd/go/testdata/script/mod_internal.txt +++ b/libgo/go/cmd/go/testdata/script/mod_internal.txt @@ -3,34 +3,34 @@ env GO111MODULE=on # golang.org/x/internal should be importable from other golang.org/x modules. go mod edit -module=golang.org/x/anything -go get -d . +go get . # ...and their tests... go test stdout PASS # ...but that should not leak into other modules. -go get -d ./baddep +go get ./baddep ! go build ./baddep stderr golang.org[/\\]notx[/\\]useinternal stderr 'use of internal package golang.org/x/.* not allowed' # Internal packages in the standard library should not leak into modules. -go get -d ./fromstd +go get ./fromstd ! go build ./fromstd stderr 'use of internal package internal/testenv not allowed' # Dependencies should be able to use their own internal modules... go mod edit -module=golang.org/notx -go get -d ./throughdep +go get ./throughdep # ... but other modules should not, even if they have transitive dependencies. -go get -d . +go get . ! go build . stderr 'use of internal package golang.org/x/.* not allowed' # And transitive dependencies still should not leak. -go get -d ./baddep +go get ./baddep ! go build ./baddep stderr golang.org[/\\]notx[/\\]useinternal stderr 'use of internal package golang.org/x/.* not allowed' @@ -38,17 +38,17 @@ stderr 'use of internal package golang.org/x/.* not allowed' # Replacing an internal module should keep it internal to the same paths. go mod edit -module=golang.org/notx go mod edit -replace golang.org/x/internal=./replace/golang.org/notx/internal -go get -d ./throughdep +go get ./throughdep -go get -d ./baddep +go get ./baddep ! go build ./baddep stderr golang.org[/\\]notx[/\\]useinternal stderr 'use of internal package golang.org/x/.* not allowed' go mod edit -replace golang.org/x/internal=./vendor/golang.org/x/internal -go get -d ./throughdep +go get ./throughdep -go get -d ./baddep +go get ./baddep ! go build ./baddep stderr golang.org[/\\]notx[/\\]useinternal stderr 'use of internal package golang.org/x/.* not allowed' |