diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-12-11 11:59:47 +0200 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-12-11 11:59:47 +0200 |
commit | 4ba9c52641bd83bd71526e540ba282e11829423c (patch) | |
tree | f42c41bb5d17fb4588323b4e9c895edb336562c2 | |
parent | 35f3afdbdea49b9b6da3431022a50b94a47ec912 (diff) | |
download | sbotools-4ba9c52641bd83bd71526e540ba282e11829423c.tar.xz |
t/12-readme, etc: add tests for displaying other readme files. See #49.
-rwxr-xr-x | t/12-readme.t | 9 | ||||
-rw-r--r-- | t/LO-readme/otherreadmes/README | 1 | ||||
-rw-r--r-- | t/LO-readme/otherreadmes/README.SBo | 1 | ||||
-rw-r--r-- | t/LO-readme/otherreadmes/README.SLACKWARE | 1 | ||||
-rw-r--r-- | t/LO-readme/otherreadmes/otherreadmes.SlackBuild | 15 | ||||
-rw-r--r-- | t/LO-readme/otherreadmes/otherreadmes.info | 10 |
6 files changed, 36 insertions, 1 deletions
diff --git a/t/12-readme.t b/t/12-readme.t index ff69ac2..1ef427c 100755 --- a/t/12-readme.t +++ b/t/12-readme.t @@ -10,7 +10,7 @@ use lib $RealBin; use Test::Sbotools qw/ make_slackbuilds_txt set_lo sboinstall sboremove restore_perf_dummy /; if ($ENV{TEST_INSTALL}) { - plan tests => 10; + plan tests => 11; } else { plan skip_all => 'Only run these tests if TEST_INSTALL=1'; } @@ -19,12 +19,16 @@ sub cleanup { capture_merged { system(qw!/sbin/removepkg envsettingtest!); system(qw!/sbin/removepkg envsettingtest2!); + system(qw!/sbin/removepkg otherreadmes!); unlink "$RealBin/LO-readme/envsettingtest/perf.dummy"; unlink "$RealBin/LO-readme/envsettingtest2/perf.dummy"; + unlink "$RealBin/LO-readme/otherreadmes/perf.dummy"; system(qw!rm -rf /tmp/SBo/envsettingtest-1.0!); system(qw!rm -rf /tmp/SBo/envsettingtest2-1.0!); + system(qw!rm -rf /tmp/SBo/otherreadmes-1.0!); system(qw!rm -rf /tmp/package-envsettingtest!); system(qw!rm -rf /tmp/package-envsettingtest2!); + system(qw!rm -rf /tmp/package-otherreadmes!); }; } @@ -70,6 +74,9 @@ SKIP: { capture_merged { system(qw/ userdel test /); system(qw/ groupdel test /); }; } +# 11: sboinstall otherreadmes +sboinstall 'otherreadmes', { input => "y\ny\ny", expected => qr/Display.*README.*SlackBuilds[.]org.*SLACKWARE/s }; + # Cleanup END { cleanup(); diff --git a/t/LO-readme/otherreadmes/README b/t/LO-readme/otherreadmes/README new file mode 100644 index 0000000..6d388bb --- /dev/null +++ b/t/LO-readme/otherreadmes/README @@ -0,0 +1 @@ +This doesn't exist! diff --git a/t/LO-readme/otherreadmes/README.SBo b/t/LO-readme/otherreadmes/README.SBo new file mode 100644 index 0000000..7ff669b --- /dev/null +++ b/t/LO-readme/otherreadmes/README.SBo @@ -0,0 +1 @@ +this is the README for SlackBuilds.org diff --git a/t/LO-readme/otherreadmes/README.SLACKWARE b/t/LO-readme/otherreadmes/README.SLACKWARE new file mode 100644 index 0000000..9539839 --- /dev/null +++ b/t/LO-readme/otherreadmes/README.SLACKWARE @@ -0,0 +1 @@ +this is the README for SLACKWARE! diff --git a/t/LO-readme/otherreadmes/otherreadmes.SlackBuild b/t/LO-readme/otherreadmes/otherreadmes.SlackBuild new file mode 100644 index 0000000..4466ded --- /dev/null +++ b/t/LO-readme/otherreadmes/otherreadmes.SlackBuild @@ -0,0 +1,15 @@ +#!/bin/bash +PRGNAM="otherreadmes" +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-readme/otherreadmes/otherreadmes.info b/t/LO-readme/otherreadmes/otherreadmes.info new file mode 100644 index 0000000..3dcaf67 --- /dev/null +++ b/t/LO-readme/otherreadmes/otherreadmes.info @@ -0,0 +1,10 @@ +PRGNAM="otherreadmes" +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="" +MAINTAINER="Andreas Guldstrand" +EMAIL="doesnt@matter.org" |