Showing the full path (relative to the current directory)
instead of just foo.txt lets editors that understand file:line
jump straight to the file without having to edit it to say
testdata/script/ first.
Change-Id: I44177b687249f3c7c724b45d02f5167607369e1b
Reviewed-on: https://go-review.googlesource.com/c/go/+/498119
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
}
}
- 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))
})
}
}