zrepl/cmd/config/config_test.go

28 lines
423 B
Go
Raw Normal View History

2018-08-26 15:17:15 +02:00
package config
import (
"github.com/kr/pretty"
"path/filepath"
2018-08-26 16:44:34 +02:00
"testing"
2018-08-26 15:17:15 +02:00
)
func TestSampleConfigsAreParsedWithoutErrors(t *testing.T) {
paths, err := filepath.Glob("./samples/*")
if err != nil {
t.Errorf("glob failed: %+v", err)
}
for _, p := range paths {
c, err := ParseConfig(p)
if err != nil {
t.Errorf("error parsing %s:\n%+v", p, err)
}
t.Logf("file: %s", p)
t.Log(pretty.Sprint(c))
}
}