Commit 0358c895 authored by Russ Cox's avatar Russ Cox

io/ioutil: remove another reference to _test

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5492051
parent 80103cd5
...@@ -70,26 +70,26 @@ func TestReadDir(t *testing.T) { ...@@ -70,26 +70,26 @@ func TestReadDir(t *testing.T) {
t.Fatalf("ReadDir %s: error expected, none found", dirname) t.Fatalf("ReadDir %s: error expected, none found", dirname)
} }
dirname = "." dirname = ".."
list, err := ReadDir(dirname) list, err := ReadDir(dirname)
if err != nil { if err != nil {
t.Fatalf("ReadDir %s: %v", dirname, err) t.Fatalf("ReadDir %s: %v", dirname, err)
} }
foundTest := false foundFile := false
foundTestDir := false foundSubDir := false
for _, dir := range list { for _, dir := range list {
switch { switch {
case !dir.IsDir() && dir.Name() == "ioutil_test.go": case !dir.IsDir() && dir.Name() == "io_test.go":
foundTest = true foundFile = true
case dir.IsDir() && dir.Name() == "_test": case dir.IsDir() && dir.Name() == "ioutil":
foundTestDir = true foundSubDir = true
} }
} }
if !foundTest { if !foundFile {
t.Fatalf("ReadDir %s: test file not found", dirname) t.Fatalf("ReadDir %s: io_test.go file not found", dirname)
} }
if !foundTestDir { if !foundSubDir {
t.Fatalf("ReadDir %s: _test directory not found", dirname) t.Fatalf("ReadDir %s: ioutil directory not found", dirname)
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment