]> Cypherpunks repositories - gostls13.git/commitdiff
gotest: exclude . files when parsing directories (per r's suggestion)
authorRobert Griesemer <gri@golang.org>
Wed, 30 Mar 2011 16:46:11 +0000 (09:46 -0700)
committerRobert Griesemer <gri@golang.org>
Wed, 30 Mar 2011 16:46:11 +0000 (09:46 -0700)
R=r, rsc1, iant2
CC=golang-dev
https://golang.org/cl/4329044

src/cmd/gotest/gotest.go

index ae33eb7181a218999c4f1b0673a2816e4ea59e0e..08f9ed4ee99abdd28b71b8ff8c2bdeb4137ff4b2 100644 (file)
@@ -177,7 +177,7 @@ func setEnvironment() {
 func getTestFileNames() {
        names := flag.Args()
        if len(names) == 0 {
-               names = filepath.Glob("*_test.go")
+               names = filepath.Glob("[^.]*_test.go")
                if len(names) == 0 {
                        Fatalf(`no test files found: no match for "*_test.go"`)
                }