1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2024-11-25 09:35:39 +00:00
go-mtree/mtree_test.go
Vincent Batts fe68ca2065 *: parsing a spec to a Hierarchy struct
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-03-11 15:58:18 -05:00

36 lines
465 B
Go

package mtree
import (
"fmt"
"os"
"testing"
)
var testFiles = []string{
"testdata/source.mtree",
}
func TestParser(t *testing.T) {
for _, file := range testFiles {
func() {
fh, err := os.Open(file)
if err != nil {
t.Error(err)
return
}
defer fh.Close()
dh, err := ParseSpec(fh)
if err != nil {
t.Error(err)
}
fmt.Printf("%q", dh)
_, err = dh.WriteTo(os.Stdout)
if err != nil {
t.Error(err)
}
}()
}
}