diff --git a/src/cmd/go/script_test.go b/src/cmd/go/script_test.go index eac365bd7d..f7829cb918 100644 --- a/src/cmd/go/script_test.go +++ b/src/cmd/go/script_test.go @@ -151,7 +151,11 @@ func TestScript(t *testing.T) { } } - scripttest.Run(t, engine, s, filepath.Base(file), bytes.NewReader(a.Comment)) + // Note: Do not use filepath.Base(file) here: + // editors that can jump to file:line references in the output + // will work better seeing the full path relative to cmd/go + // (where the "go test" command is usually run). + scripttest.Run(t, engine, s, file, bytes.NewReader(a.Comment)) }) } }