5 #printf "# PATH=%s\n" "$PATH" 1>&2
14 cd tmp || bailout 'cannot cd to tmp'
22 require -v zpm newpackage -C $pkgid
23 require -v zpm add -vvv -f $PF $pkgid foo
25 require -v zpm extract -f zpmtest-1.0-1.zpm $h foo2
27 okstreq "$h" "$h2" "foo and foo2 hash match"
29 pkglist=$(zpm showpkg zpmtest-1.0-1.zpm)
31 okstreq "$1" "zpmtest" package name
32 okstreq "$2" "1.0" package version
33 okstreq "$3" "1" package release
34 okstreq "$4" "/foo" file foo in package
38 require zpm newpackage -f $PF -C $pkgid
39 require zpm add -f $PF zpmtest foo
41 require zpm extract -f $PF $h foo2
45 pkglist=$(zpm showpkg $PF)
47 okstreq "$1" "zpmtest" package name
48 okstreq "$2" "1.0" package version
49 okstreq "$3" "1" package release
50 okstreq "$4" "/foo" file foo in package
56 require zpm newpackage -f $PF -C $pkgid
57 require -v zpm add -f $PF -S subdir zpmtest subdir/foo
58 fn=$(zpm showpkg $PF | awk '{print $4}')
59 okstreq "$fn" "/foo" file foo in package prefix striped
62 require zpm newpackage -f $PF -C $pkgid
63 require zpm add -f $PF zpmtest foo
64 ph=$(zpm pkg -f $PF zpmtest hash)
65 okstreq "$ph" "" package hash empty
66 mtime=$(zpm pkg -f $PF zpmtest build_time)
67 okstreq "$ph" "" package mtime empty
69 zpm add -C -f $PF zpmtest subdir/foo
70 okexit added file and completed package
71 ph=$(zpm pkg -f $PF zpmtest hash)
73 okexit package hash not empty
75 mtime=$(zpm pkg -f $PF zpmtest build_time)
77 okexit package mtime not empty
80 require zpm add -f $PF zpmtest subdir/bar
81 ph=$(zpm pkg -f $PF zpmtest hash)
82 okstreq "$ph" "" package hash cleared
83 mtime=$(zpm pkg -f $PF zpmtest build_time)
84 okstreq "$ph" "" package mtime cleared