From adbbf2f54cfd5254ed439e17d2fa21d22ed072fd Mon Sep 17 00:00:00 2001 From: Nathan Wagner Date: Wed, 1 Mar 2017 08:11:04 -0600 Subject: [PATCH] add test file for git-hash --- t/hash.t | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 t/hash.t diff --git a/t/hash.t b/t/hash.t new file mode 100755 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 -- 2.40.0