diff options
-rwxr-xr-x | t/04-install.t | 9 | ||||
-rw-r--r-- | t/LO/nonexistentslackbuild6/README | 1 | ||||
-rw-r--r-- | t/LO/nonexistentslackbuild6/nonexistentslackbuild6.SlackBuild | 15 | ||||
-rw-r--r-- | t/LO/nonexistentslackbuild6/nonexistentslackbuild6.info | 10 | ||||
-rw-r--r-- | t/travis-deps/install.sh | 1 |
5 files changed, 35 insertions, 1 deletions
diff --git a/t/04-install.t b/t/04-install.t index 830ee3d..4736a6e 100755 --- a/t/04-install.t +++ b/t/04-install.t @@ -11,7 +11,7 @@ use lib "$RealBin/../SBO-Lib/lib"; use Test::Execute; if ($ENV{TEST_INSTALL}) { - plan tests => 8; + plan tests => 9; } else { plan skip_all => 'Only run these tests if TEST_INSTALL=1'; } @@ -24,15 +24,19 @@ sub cleanup { system(qw!/sbin/removepkg nonexistentslackbuild!); system(qw!/sbin/removepkg nonexistentslackbuild4!); system(qw!/sbin/removepkg nonexistentslackbuild5!); + system(qw!/sbin/removepkg nonexistentslackbuild6!); unlink "$RealBin/LO/nonexistentslackbuild/perf.dummy"; unlink "$RealBin/LO/nonexistentslackbuild4/perf.dummy"; unlink "$RealBin/LO/nonexistentslackbuild5/perf.dummy"; + unlink "$RealBin/LO/nonexistentslackbuild6/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/nonexistentslackbuild6-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-nonexistentslackbuild6!); }; } @@ -94,6 +98,9 @@ script (qw/ sboremove nonexistentslackbuild5 /, { input => "y\ny", test => 0 }); script (qw/ sboinstall nonexistentslackbuild4 /, { input => "y\ny", expected => qr/nonexistentslackbuild5 added to install queue.*Install queue: nonexistentslackbuild5/s }); script (qw/ sboremove nonexistentslackbuild4 nonexistentslackbuild5 /, { input => "y\ny\ny", test => 0 }); +# 9: sboinstall nonexistentslackbuild6 +script (qw/ sboinstall nonexistentslackbuild6 /, { input => "y\ny", expected => qr/nonexistentslackbuild6 added to install queue.*Install queue: nonexistentslackbuild6/s }); + # Cleanup END { set_lo('delete'); diff --git a/t/LO/nonexistentslackbuild6/README b/t/LO/nonexistentslackbuild6/README new file mode 100644 index 0000000..6d388bb --- /dev/null +++ b/t/LO/nonexistentslackbuild6/README @@ -0,0 +1 @@ +This doesn't exist! diff --git a/t/LO/nonexistentslackbuild6/nonexistentslackbuild6.SlackBuild b/t/LO/nonexistentslackbuild6/nonexistentslackbuild6.SlackBuild new file mode 100644 index 0000000..3d62845 --- /dev/null +++ b/t/LO/nonexistentslackbuild6/nonexistentslackbuild6.SlackBuild @@ -0,0 +1,15 @@ +#!/bin/bash +PRGNAM="nonexistentslackbuild6" +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/nonexistentslackbuild6/nonexistentslackbuild6.info b/t/LO/nonexistentslackbuild6/nonexistentslackbuild6.info new file mode 100644 index 0000000..30910d2 --- /dev/null +++ b/t/LO/nonexistentslackbuild6/nonexistentslackbuild6.info @@ -0,0 +1,10 @@ +PRGNAM="nonexistentslackbuild6" +VERSION="1.0" +HOMEPAGE="http://www.example.com" +DOWNLOAD="http://www.pastemobile.org/perf.dummy" +MD5SUM="9cba6c70fb57a22a155073d54748b614" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="aaa_base" +MAINTAINER="Andreas Guldstrand" +EMAIL="doesnt@matter.org" diff --git a/t/travis-deps/install.sh b/t/travis-deps/install.sh index 125e4f6..727e861 100644 --- a/t/travis-deps/install.sh +++ b/t/travis-deps/install.sh @@ -1,5 +1,6 @@ #!/bin/bash mkdir -p /var/log/packages +touch "/var/log/packages/aaa_base-14.1-x86_64-1" cp -a t/travis-deps/*pkg /sbin/ echo "127.0.0.1 slackware.uk" >> /etc/hosts |