1
0
Fork 1
mirror of https://github.com/vbatts/tar-split.git synced 2024-11-16 13:28:37 +00:00
tar-split/walk_test.go
Vincent Batts d1ddeb8e3d *: close to producing a validating hierarchy
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-03-24 16:35:09 -04:00

33 lines
515 B
Go

package mtree
import (
"io/ioutil"
"testing"
)
func TestWalk(t *testing.T) {
dh, err := Walk(".", nil, append(DefaultKeywords, "sha1"))
if err != nil {
t.Fatal(err)
}
fh, err := ioutil.TempFile("", "walk.")
if err != nil {
t.Fatal(err)
}
if _, err = dh.WriteTo(fh); err != nil {
t.Error(err)
}
fh.Close()
t.Fatal(fh.Name())
//os.Remove(fh.Name())
}
func TestReadNames(t *testing.T) {
names, err := readOrderedDirNames(".")
if err != nil {
t.Error(err)
}
t.Errorf("names: %q", names)
}