tg.grepBoth(`testinternal2(\/|\\)p\.go\:3\:8\: use of internal package .*internal/w not allowed`, "wrote error message for testdata/testinternal2")
}
-func TestRunPkg(t *testing.T) {
- tg := testgo(t)
- defer tg.cleanup()
- dir := filepath.Join(tg.pwd(), "testdata")
- tg.setenv("GOPATH", dir)
- tg.run("run", "hello")
- tg.grepStderr("hello, world", "did not find hello, world")
- tg.cd(filepath.Join(dir, "src/hello"))
- tg.run("run", ".")
- tg.grepStderr("hello, world", "did not find hello, world")
-}
-
func TestInternalPackageErrorsAreHandled(t *testing.T) {
tg := testgo(t)
defer tg.cleanup()