]> pd.if.org Git - zpackage/blob - addtopackage.t
a0ef944edc1a58b600d9463bdb8a13a3cf289577
[zpackage] / addtopackage.t
1 #!/bin/sh
2
3 # test addfile
4
5 #printf "# PATH=%s\n" "$PATH" 1>&2
6 . tap.sh
7
8 PF=test.db
9
10 plan 7
11
12 td=test.addtopackage
13 rm -rf $td
14 mkdir $td
15 echo foo > $td/foo
16
17 tryrun zpm addtopackage zpmtest $td/foo
18 h=$(zpm hash $td/foo)
19 tryrun zpm extract zpmtest-1.0-1.zpm $h $td/foo2
20 h2=$(zpm hash $td/foo2)
21 okstreq "$h" "$h2"
22 pkglist=$(zpm showpkg zpmtest-1.0-1.zpm)
23 set $pkglist
24 okstreq "$1" "zpmtest"
25 okstreq "$2" "1.0"
26 okstreq "$3" "1"
27 okstreq "$4" "$td/foo"
28
29 finish
30
31 rm -rf $td