From: Nathan Wagner Date: Mon, 19 Sep 2016 02:58:57 +0000 (+0000) Subject: merge X-Git-Tag: v0.1.6~186 X-Git-Url: https://pd.if.org/git/?p=zpackage;a=commitdiff_plain;h=8c65f3332b8970449d02cabb7508ec725306552e merge --- diff --git a/t/addfile b/t/addfile deleted file mode 100644 index 490ea96..0000000 --- a/t/addfile +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/sh - -# test addfile - -tn=0 -planned=0 - -okexit() { - if [ $? -ne 0 ]; then - printf 'not '; - fi - tn=$((tn + 1)) - printf 'ok %d - %s\n' $tn "$*" -} - -failsok() { - if [ $? -eq 0 ]; then - printf 'not '; - fi - tn=$((tn + 1)) - printf 'ok %d - %s\n' $tn "$*" -} - -exitwith() { - if [ $? -ne $1 ]; then - printf 'not '; - fi - shift - tn=$((tn + 1)) - printf 'ok %d - %s\n' $tn "$*" -} - -okstreq() { - note= - if [ "$1" != "$2" ]; then - printf 'not '; - note=$(printf '# got "%s" expected "%s"' "$1" "$2") - fi - - shift;shift; - tn=$((tn + 1)) - printf 'ok %d - %s\n' $tn "$*" - if [ "$note" != "" ]; then - printf '%s\n' "$note" - fi -} - -plan() { - planned=$1 - printf '1..%d\n' $planned -} - -finish() { - if [ $planned -eq 0 ]; then - printf '1..%d\n' $tn - fi -} - -plan 4 - -PF=test.db - -rm -f $PF test.empty -touch test.empty - -hash=$(../zpm-addfile $PF test.empty) >> test.out 2>&1 -okexit add empty file content -okstreq $hash e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 hash contents - -appid=$(sqlite3 test.db 'pragma application_id') -okstreq $appid 1515209794 application id set - -userv=$(sqlite3 test.db 'pragma user_version') -okstreq $userv 1 db version set - -finish - -rm -f $PF test.empty