diff options
Diffstat (limited to 'src/cmd/go/testdata/script/mod_build_info_err.txt')
-rw-r--r-- | src/cmd/go/testdata/script/mod_build_info_err.txt | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/cmd/go/testdata/script/mod_build_info_err.txt b/src/cmd/go/testdata/script/mod_build_info_err.txt index a6853b5c86..4a6ee9e8bb 100644 --- a/src/cmd/go/testdata/script/mod_build_info_err.txt +++ b/src/cmd/go/testdata/script/mod_build_info_err.txt @@ -1,8 +1,19 @@ # This test verifies that line numbers are included in module import errors. # Verifies golang.org/issue/34393. -go list -e -deps -f '{{with .Error}}{{.Pos}}: {{.Err}}{{end}}' ./main -stdout 'bad[/\\]bad.go:3:8: malformed import path "š§.example.com/string": invalid char ''š§''' +go list -e -mod=mod -deps -f '{{with .Error}}{{.Pos}}: {{.Err}}{{end}}' ./main +stdout '^bad[/\\]bad.go:3:8: malformed import path "š§.example.com/string": invalid char ''š§''$' + +# TODO(#26909): This should include an import stack. +# (Today it includes only a file and line.) +! go build ./main +stderr '^bad[/\\]bad.go:3:8: malformed import path "š§.example.com/string": invalid char ''š§''$' + +# TODO(#41688): This should include a file and line, and report the reason for the error.. +# (Today it includes only an import stack, and does not indicate the actual problem.) +! go get -d ./main +stderr '^m/main imports\n\tm/bad imports\n\tš§.example.com/string: import missing$' + -- go.mod -- module m |