1
0
Fork 0
mirror of https://github.com/vbatts/sl-feeds.git synced 2024-11-15 20:58:38 +00:00
sl-feeds/util/find_test.go
Vincent Batts e646c9daef
util: file path finder
Convenience to walk a directory tree looking for a file like
"ChangeLog.txt"

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-01-29 15:50:51 -05:00

14 lines
251 B
Go

package util
import "testing"
func TestFind(t *testing.T) {
paths, err := FindFiles("../changelog", "ChangeLog.txt")
if err != nil {
t.Fatal(err)
}
if len(paths) != 1 {
t.Errorf("expected to find %d file, but found %d", 1, len(paths))
}
}