pull/18/head
Hugo Landau 10 years ago
parent c0fe9971cd
commit 7a948f972c

@ -40,18 +40,19 @@ func stripTag(L string) string {
func suiteReader(t *testing.T) <-chan testItem { func suiteReader(t *testing.T) <-chan testItem {
testItemChan := make(chan testItem, 20) testItemChan := make(chan testItem, 20)
go func() { gopath := os.Getenv("GOPATH")
gopath := os.Getenv("GOPATH") if gopath == "" {
if gopath == "" { gopath = "."
gopath = "." }
}
fpath := filepath.Join(gopath, "src/github.com/hlandau/nctestsuite/testsuite.txt") fpath := filepath.Join(gopath, "src/github.com/hlandau/nctestsuite/testsuite.txt")
f, err := os.Open(fpath) f, err := os.Open(fpath)
if err != nil { if err != nil {
t.Fatalf("Error: Couldn't open %s: %+v", fpath, err) t.Fatalf("Error: Couldn't open %s: %+v", fpath, err)
} }
go func() {
defer f.Close() defer f.Close()
lineChan := make(chan string, 20) lineChan := make(chan string, 20)

Loading…
Cancel
Save