mirror of
https://github.com/vbatts/go-mtree.git
synced 2024-11-22 08:25:38 +00:00
Vincent Batts
455edf6d21
For the most part, all the keywords for a standard mtree spec now have a function to produce the contents for a creator. These are used in the "walk" function, and will be used next in the "check" logic. This is still a WIP, as the DirectoryHierarchy produced from the current Walk() is not all-together a valid document. Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
16 lines
290 B
Go
16 lines
290 B
Go
package mtree
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
func TestWalk(t *testing.T) {
|
|
dh, err := Walk(".", nil, append(DefaultKeywords, "cksum", "md5", "rmd160digest", "sha1", "sha256", "sha512"))
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if _, err = dh.WriteTo(os.Stdout); err != nil {
|
|
t.Error(err)
|
|
}
|
|
}
|