diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2019-12-01 21:23:57 +0000 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2019-12-01 21:26:05 +0000 |
commit | 182e71afccb8ef649e9738aa8034c9c2cdfcfd7a (patch) | |
tree | 2a08123becd569f2694638725fc713b6d4249a29 /reader/reader_test.go | |
parent | 332aee4fa6c75e07337efaa44e2b4c8ec4348c65 (diff) |
tweaking the globbing func
Diffstat (limited to '')
-rw-r--r-- | reader/reader_test.go | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/reader/reader_test.go b/reader/reader_test.go index 33eea2e..4be02df 100644 --- a/reader/reader_test.go +++ b/reader/reader_test.go @@ -1,6 +1,7 @@ package reader import ( + "strings" "testing" ) @@ -137,8 +138,18 @@ func TestExtract(t *testing.T) { func TestGetTargetFiles(t *testing.T) { path := "/home/lemon/go/src/github.com/hammerheadlemon/datamaps-go/reader/testdata/" - _, err := GetTargetFiles(path) + files, err := GetTargetFiles(path) if err != nil { t.Error(err) } + found := false + for _, f := range files { + if strings.Contains(f, "test_template.xlsx") { + found = true + break + } + } + if found == false { + t.Errorf("test_template.xlsx not found - and it is there!") + } } |