# Test that mod files with missing paths produce an error. | |
# Test that go list fails on a go.mod with no module declaration. | |
cd $WORK/gopath/src/mod | |
! go list . | |
stderr '^go: no module declaration in go.mod.\n\tRun ''go mod edit -module=example.com/mod'' to specify the module path.$' | |
-- mod/go.mod -- | |
-- mod/foo.go -- | |
package foo | |