]> Cypherpunks repositories - gostls13.git/commitdiff
go/build: fix TestBogusDirectory format and maybe Windows failure
authorBrad Fitzpatrick <bradfitz@golang.org>
Wed, 23 Jan 2013 01:50:12 +0000 (17:50 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 23 Jan 2013 01:50:12 +0000 (17:50 -0800)
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/7183046

src/pkg/go/build/build_test.go

index 77f55ad4094d55d957500a3bf2504ec40bf5571c..56e2786b8ff183c318f5e3aee8b8a09c7217630a 100644 (file)
@@ -94,9 +94,9 @@ func TestLocalDirectory(t *testing.T) {
 func TestBogusDirectory(t *testing.T) {
        const dir = "/foo/bar/baz/gopher"
        _, err := ImportDir(dir, FindOnly)
-       want := fmt.Sprintf("%q is not a directory", dir)
+       want := fmt.Sprintf("%q is not a directory", filepath.FromSlash(dir))
        if err == nil || err.Error() != want {
-               t.Error("got error %q, want %q", err, want)
+               t.Errorf("got error %q, want %q", err, want)
        }
 }