diff options
-rwxr-xr-x | t/06-remove.t | 10 | ||||
-rw-r--r-- | t/LO/nonexistentslackbuild8/README | 2 | ||||
-rw-r--r-- | t/LO/nonexistentslackbuild8/nonexistentslackbuild8.SlackBuild | 15 | ||||
-rw-r--r-- | t/LO/nonexistentslackbuild8/nonexistentslackbuild8.info | 10 |
4 files changed, 36 insertions, 1 deletions
diff --git a/t/06-remove.t b/t/06-remove.t index a168074..40b15d8 100755 --- a/t/06-remove.t +++ b/t/06-remove.t @@ -10,7 +10,7 @@ use lib $RealBin; use Test::Sbotools qw/ make_slackbuilds_txt set_lo sboinstall sboremove /; if ($ENV{TEST_INSTALL}) { - plan tests => 11; + plan tests => 12; } else { plan skip_all => 'Only run these tests if TEST_INSTALL=1'; } @@ -22,18 +22,22 @@ sub cleanup { system(qw!/sbin/removepkg nonexistentslackbuild4!); system(qw!/sbin/removepkg nonexistentslackbuild5!); system(qw!/sbin/removepkg nonexistentslackbuild7!); + system(qw!/sbin/removepkg nonexistentslackbuild8!); unlink "$RealBin/LO/nonexistentslackbuild/perf.dummy"; unlink "$RealBin/LO/nonexistentslackbuild4/perf.dummy"; unlink "$RealBin/LO/nonexistentslackbuild5/perf.dummy"; unlink "$RealBin/LO/nonexistentslackbuild7/perf.dummy"; + unlink "$RealBin/LO/nonexistentslackbuild8/perf.dummy"; system(qw!rm -rf /tmp/SBo/nonexistentslackbuild-1.0!); system(qw!rm -rf /tmp/SBo/nonexistentslackbuild4-1.0!); system(qw!rm -rf /tmp/SBo/nonexistentslackbuild5-1.0!); system(qw!rm -rf /tmp/SBo/nonexistentslackbuild7-1.0!); + system(qw!rm -rf /tmp/SBo/nonexistentslackbuild8-1.0!); system(qw!rm -rf /tmp/package-nonexistentslackbuild!); system(qw!rm -rf /tmp/package-nonexistentslackbuild4!); system(qw!rm -rf /tmp/package-nonexistentslackbuild5!); system(qw!rm -rf /tmp/package-nonexistentslackbuild7!); + system(qw!rm -rf /tmp/package-nonexistentslackbuild8!); }; } @@ -79,6 +83,10 @@ TODO: { sboremove qw/ -a nonexistentslackbuild4 /, { input => "y\nn\ny", expected => qr/nonexistentslackbuild5 : required by nonexistentslackbuild7/ }; sboremove 'nonexistentslackbuild7', { input => "y\ny\ny", expected => qr/nonexistentslackbuild5/ }; +# 12: sboremove shows readme for %README% dep +sboinstall 'nonexistentslackbuild8', { input => "y\ny", test => 0 }; +sboremove 'nonexistentslackbuild8', { input => "y\ny\ny", expected => qr/But has to be read/ }; + # Cleanup END { cleanup(); diff --git a/t/LO/nonexistentslackbuild8/README b/t/LO/nonexistentslackbuild8/README new file mode 100644 index 0000000..61f9c99 --- /dev/null +++ b/t/LO/nonexistentslackbuild8/README @@ -0,0 +1,2 @@ +This doesn't exist! +But has to be read diff --git a/t/LO/nonexistentslackbuild8/nonexistentslackbuild8.SlackBuild b/t/LO/nonexistentslackbuild8/nonexistentslackbuild8.SlackBuild new file mode 100644 index 0000000..99493a1 --- /dev/null +++ b/t/LO/nonexistentslackbuild8/nonexistentslackbuild8.SlackBuild @@ -0,0 +1,15 @@ +#!/bin/bash +PRGNAM="nonexistentslackbuild8" +VERSION=${VERSION:-1.0} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +TMP=${TMP:-/tmp/SBo} +OUTPUT=${OUTPUT:-/tmp} + +mkdir -p $TMP/$PRGNAM-$VERSION +cp README $TMP/$PRGNAM-$VERSION +mkdir -p $OUTPUT/package-$PRGNAM/usr/doc/$PRGNAM-$VERSION +cp README $OUTPUT/package-$PRGNAM/usr/doc/$PRGNAM-$VERSION +cd $OUTPUT/package-$PRGNAM + +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-noarch-$BUILD$TAG.tgz diff --git a/t/LO/nonexistentslackbuild8/nonexistentslackbuild8.info b/t/LO/nonexistentslackbuild8/nonexistentslackbuild8.info new file mode 100644 index 0000000..6edc45a --- /dev/null +++ b/t/LO/nonexistentslackbuild8/nonexistentslackbuild8.info @@ -0,0 +1,10 @@ +PRGNAM="nonexistentslackbuild8" +VERSION="1.0" +HOMEPAGE="http://www.example.com" +DOWNLOAD="http://pink-mist.github.io/sbotools/testing/perf.dummy" +MD5SUM="9cba6c70fb57a22a155073d54748b614" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="%README%" +MAINTAINER="Andreas Guldstrand" +EMAIL="doesnt@matter.org" |