mirror of
https://github.com/golang/go
synced 2024-11-13 20:00:23 -07:00
fix windows build: always use / in filenames of go/doc test output
R=r CC=golang-dev https://golang.org/cl/5554055
This commit is contained in:
parent
0203fbee64
commit
eaf8295f3d
@ -77,6 +77,11 @@ func Test(t *testing.T) {
|
|||||||
importpath := dataDir + "/" + pkg.Name
|
importpath := dataDir + "/" + pkg.Name
|
||||||
doc := New(pkg, importpath, 0)
|
doc := New(pkg, importpath, 0)
|
||||||
|
|
||||||
|
// golden files always use / in filenames - canonicalize them
|
||||||
|
for i, filename := range doc.Filenames {
|
||||||
|
doc.Filenames[i] = filepath.ToSlash(filename)
|
||||||
|
}
|
||||||
|
|
||||||
// print documentation
|
// print documentation
|
||||||
var buf bytes.Buffer
|
var buf bytes.Buffer
|
||||||
if err := templateTxt.Execute(&buf, bundle{doc, fset}); err != nil {
|
if err := templateTxt.Execute(&buf, bundle{doc, fset}); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user