. tap.sh
-plan 6
+plan 7
PF=test.db
rm -f $PF test.empty
touch test.empty
-hash=$(zpm-addfile $PF test.empty 2>> test.out)
+zpm init $PF
+okexit create addfile test db
+
+hash=$(zpm addfile $PF test.empty 2>> test.out)
okexit add empty file content
-okstreq $hash e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 hash contents
+okstreq "$hash" e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 hash contents
appid=$(sqlite3 test.db 'pragma application_id')
okstreq $appid 1515209794 application id set
#!/bin/sh
-# test addfile
-
. tap.sh
-plan 5
+plan 6
PF=test.db
rm -f $PF test.foo
echo foo > test.foo
+zpm init test.db
+okexit create extract test db
+
hash=$(zpm-addfile $PF test.foo 2>> test.out)
save=$?
okexit add foo file content
-okstreq $hash b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c foo hash contents
+okstreq "$hash" b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c foo hash contents
rm -f foo