audit: sanity sha1 test

This commit is contained in:
Mitchell Hashimoto 2015-04-21 16:14:26 +01:00
parent 97ff2ad09b
commit 82252c0d34
1 changed files with 11 additions and 0 deletions

View File

@ -43,3 +43,14 @@ func TestHashWalker(t *testing.T) {
} }
} }
} }
func TestHashSHA1(t *testing.T) {
fn := HashSHA1("")
result, err := fn("foo")
if err != nil {
t.Fatalf("err: %s", err)
}
if result != "sha1:0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33" {
t.Fatalf("bad: %#v", result)
}
}