]> Cypherpunks repositories - gostls13.git/commitdiff
fix windows build: always use / in filenames of go/doc test output
authorRobert Griesemer <gri@golang.org>
Wed, 18 Jan 2012 22:59:58 +0000 (14:59 -0800)
committerRobert Griesemer <gri@golang.org>
Wed, 18 Jan 2012 22:59:58 +0000 (14:59 -0800)
R=r
CC=golang-dev
https://golang.org/cl/5554055

src/pkg/go/doc/doc_test.go

index cb9fffc8961491a227fd22189997a29be3f226d8..0a4830148afef44c71d5f0ce91a25f41367a2397 100644 (file)
@@ -77,6 +77,11 @@ func Test(t *testing.T) {
                importpath := dataDir + "/" + pkg.Name
                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
                var buf bytes.Buffer
                if err := templateTxt.Execute(&buf, bundle{doc, fset}); err != nil {