]> Cypherpunks repositories - gostls13.git/commitdiff
io/ioutil: remove another reference to _test
authorRuss Cox <rsc@golang.org>
Fri, 16 Dec 2011 00:32:47 +0000 (19:32 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 16 Dec 2011 00:32:47 +0000 (19:32 -0500)
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5492051

src/pkg/io/ioutil/ioutil_test.go

index 63be71cdf937a8d2e59be40b6d787822636fd738..3e85e3d0c8c049017916b77b2a3a2f5c181efb5f 100644 (file)
@@ -70,26 +70,26 @@ func TestReadDir(t *testing.T) {
                t.Fatalf("ReadDir %s: error expected, none found", dirname)
        }
 
-       dirname = "."
+       dirname = ".."
        list, err := ReadDir(dirname)
        if err != nil {
                t.Fatalf("ReadDir %s: %v", dirname, err)
        }
 
-       foundTest := false
-       foundTestDir := false
+       foundFile := false
+       foundSubDir := false
        for _, dir := range list {
                switch {
-               case !dir.IsDir() && dir.Name() == "ioutil_test.go":
-                       foundTest = true
-               case dir.IsDir() && dir.Name() == "_test":
-                       foundTestDir = true
+               case !dir.IsDir() && dir.Name() == "io_test.go":
+                       foundFile = true
+               case dir.IsDir() && dir.Name() == "ioutil":
+                       foundSubDir = true
                }
        }
-       if !foundTest {
-               t.Fatalf("ReadDir %s: test file not found", dirname)
+       if !foundFile {
+               t.Fatalf("ReadDir %s: io_test.go file not found", dirname)
        }
-       if !foundTestDir {
-               t.Fatalf("ReadDir %s: _test directory not found", dirname)
+       if !foundSubDir {
+               t.Fatalf("ReadDir %s: ioutil directory not found", dirname)
        }
 }