]> pd.if.org Git - zpackage/blobdiff - t/hash.t
add hashing stdin to zpm-hash
[zpackage] / t / hash.t
index 48006dbc256882ded91deda129b4f435eccf8802..c727066d2d46b8f5bb82b1790682fb4269c048a0 100755 (executable)
--- a/t/hash.t
+++ b/t/hash.t
@@ -9,7 +9,7 @@ vtest() {
        okstreq "$res" "$2" "$1 == $2"
 }
 
-plan 2
+plan 4
 
 printf '' > hash.test
 vtest hash.test e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
@@ -18,5 +18,10 @@ vtest hash.test b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c
 
 rm hash.test
 
+res=$(printf 'foo\n' | zpm-hash)
+okstreq $res b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c
+
+res=$(printf 'foo\n' | zpm-hash -)
+okstreq $res b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c
 
 finish