10 pkgid=scriptrunner-1.0-1
14 cd tmp 2>/dev/null || bailout "can't cd to tmp"
17 require zpm newpackage -f $PF $pkgid
19 tryrun zpm setscript -f $PF scriptrunner-1.0-1 configure /bin/true
20 tryrun zpm runscript -f $PF -p configure scriptrunner-1.0-1
21 tryrun zpm setscript -f $PF scriptrunner-1.0-1 configure /bin/false
22 zpm runscript -f $PF -p configure scriptrunner-1.0-1 2>/dev/null
23 failsok failure script fails
25 zpm runscript -f $PF -p nosuchphase -R scriptrunner-1.0-1 2>/dev/null
26 failsok required non-existing script fails
27 tryrun zpm runscript -f $PF -p nosuchphase scriptrunner-1.0-1 2>/dev/null
33 tryrun zpm setscript -f $PF scriptrunner-1.0-1 configure script
34 first=$(zpm runscript -f $PF -p configure -o - scriptrunner-1.0-1)
35 okexit first arg script
36 okstreq "$first" "scriptrunner-1.0-1" "first arg value"
42 tryrun zpm setscript -f $PF scriptrunner-1.0-1 configure script
43 second=$(zpm runscript -f $PF -p configure -o - scriptrunner-1.0-1 secondarg)
44 okexit second arg script
45 okstreq "$second" "secondarg" "second arg value"