2016-03-23 20:58:16 +00:00
|
|
|
package mtree
|
|
|
|
|
2016-04-05 22:13:27 +00:00
|
|
|
import "testing"
|
2016-03-23 20:58:16 +00:00
|
|
|
|
|
|
|
func TestCheck(t *testing.T) {
|
|
|
|
dh, err := Walk(".", nil, append(DefaultKeywords, "sha1"))
|
|
|
|
if err != nil {
|
|
|
|
t.Fatal(err)
|
|
|
|
}
|
|
|
|
|
|
|
|
res, err := Check(".", dh)
|
|
|
|
if err != nil {
|
|
|
|
t.Fatal(err)
|
|
|
|
}
|
2016-04-05 22:13:27 +00:00
|
|
|
|
|
|
|
if len(res.Failures) > 0 {
|
|
|
|
t.Errorf("%#v", res)
|
|
|
|
}
|
2016-03-23 20:58:16 +00:00
|
|
|
}
|
2016-04-05 22:13:27 +00:00
|
|
|
|
|
|
|
// TODO make a directory, walk it, check it, modify it and ensure it fails
|