add missing test

This commit is contained in:
Chris Cooper 2016-02-09 10:49:41 -05:00
parent fe0e3aaaa0
commit 2c6f873ecd
1 changed files with 7 additions and 0 deletions

View File

@ -1418,6 +1418,13 @@ func TestReadConfigPaths_dir(t *testing.T) {
t.Fatalf("err: %s", err) t.Fatalf("err: %s", err)
} }
// An empty file shouldn't be read
err = ioutil.WriteFile(filepath.Join(td, "d.json"),
[]byte{}, 0664)
if err != nil {
t.Fatalf("err: %s", err)
}
config, err := ReadConfigPaths([]string{td}) config, err := ReadConfigPaths([]string{td})
if err != nil { if err != nil {
t.Fatalf("err: %s", err) t.Fatalf("err: %s", err)