X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=t%2Finstall.t;h=3424361ac7928318f0dfa9ceaff02efe198a4287;hb=5a5fb3563c6eaee14fb03fae46c1b5612a7c8d57;hp=79308e028c70acace13a92fbd58b5644ad490301;hpb=c42956d483a79cb96ac9d9f8d1f173915c045afd;p=zpackage diff --git a/t/install.t b/t/install.t index 79308e0..3424361 100755 --- a/t/install.t +++ b/t/install.t @@ -6,7 +6,7 @@ . tap.sh -plan 46 +plan 51 newpkg() { pkgid=$1 @@ -171,6 +171,22 @@ skiponfail 3 "can't create $pkgid" || { } } +# +# package with failing pre-script +# +pkgid=fourth-1.0-1 +PF=$pkgid.zpm +newpkg $pkgid /bin/printf +skiponfail 3 "can't create $pkgid" || { + zpm setscript -f $PF $pkgid pre-install /bin/false + okexit "add false pre-install script to $pkgid" + skiponfail 1 "can't set $pkgid pre-install script" || { + zpm install -R. -d local.db -f $PF $pkgid 2>/dev/null + failsok failed to install $pkgid + } +} + + cd .. || bailout require rm -rf tmp