]> pd.if.org Git - zpackage/commitdiff
add test file for git-hash
authorNathan Wagner <nw@hydaspes.if.org>
Wed, 1 Mar 2017 14:11:04 +0000 (08:11 -0600)
committerNathan Wagner <nw@hydaspes.if.org>
Wed, 1 Mar 2017 14:11:04 +0000 (08:11 -0600)
t/hash.t [new file with mode: 0755]

diff --git a/t/hash.t b/t/hash.t
new file mode 100755 (executable)
index 0000000..48006db
--- /dev/null
+++ b/t/hash.t
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# test addfile
+
+. tap.sh
+
+vtest() {
+       res=$(zpm-hash "$1" "$2")
+       okstreq "$res" "$2" "$1 == $2"
+}
+
+plan 2
+
+printf '' > hash.test
+vtest hash.test e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
+printf 'foo\n' > hash.test
+vtest hash.test b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c
+
+rm hash.test
+
+
+finish