diff options
| author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-05-03 00:04:46 +0200 | 
|---|---|---|
| committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-05-03 00:04:46 +0200 | 
| commit | c400ed58e4ce1a16bb5f092f38753db80874a0de (patch) | |
| tree | b33f545db7125b9a44efa05c1708ea7e3315d39d /t | |
| parent | 406a651afd49e5e987915ef194e72b8b9a2771f0 (diff) | |
| download | sbotools2-c400ed58e4ce1a16bb5f092f38753db80874a0de.tar.xz | |
09-multilib.t: add tests for multilibsbo with commands in readme
Diffstat (limited to 't')
4 files changed, 48 insertions, 1 deletions
diff --git a/t/09-multilib.t b/t/09-multilib.t index 9bb91cb..3c8602d 100755 --- a/t/09-multilib.t +++ b/t/09-multilib.t @@ -12,7 +12,7 @@ use File::Temp 'tempdir';  $ENV{TEST_MULTILIB} //= 0;  if ($ENV{TEST_INSTALL} and ($ENV{TEST_MULTILIB} == 2)) { -	plan tests => 9; +	plan tests => 10;  } else {  	plan skip_all => 'Only run these tests if TEST_INSTALL=1 and TEST_MULTILIB=2';  } @@ -73,6 +73,9 @@ SKIP: {  # 9: multilibsbo while answering no  sboinstall qw/ -p multilibsbo /, { input => "n", expected => qr/Proceed with multilibsbo\?/ }; +# 10: multilibsbo with command in readme +sboinstall qw/ -p multilibsbowithcommandinreadme /, { input => "y\ny\nn\nn\nn", expected => qr/It looks like.*Shall I run.*Proceed.*It looks like.*Shall I run.*Proceed.*Are you sure/s }; +  # Cleanup  END {  	cleanup(); diff --git a/t/LO-multilib/multilibsbowithcommandinreadme/README b/t/LO-multilib/multilibsbowithcommandinreadme/README new file mode 100644 index 0000000..6e51784 --- /dev/null +++ b/t/LO-multilib/multilibsbowithcommandinreadme/README @@ -0,0 +1,4 @@ +This doesn't exist! + +  groupadd -g 200 test +  useradd -u 200 -g 200 -d /tmp test diff --git a/t/LO-multilib/multilibsbowithcommandinreadme/multilibsbowithcommandinreadme.SlackBuild b/t/LO-multilib/multilibsbowithcommandinreadme/multilibsbowithcommandinreadme.SlackBuild new file mode 100644 index 0000000..153caca --- /dev/null +++ b/t/LO-multilib/multilibsbowithcommandinreadme/multilibsbowithcommandinreadme.SlackBuild @@ -0,0 +1,30 @@ +#!/bin/bash +PRGNAM="multilibsbowithcommandinreadme" +VERSION=${VERSION:-1.0} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +TMP=${TMP:-/tmp/SBo} +OUTPUT=${OUTPUT:-/tmp} + +if [ -z "$ARCH" ]; then +  case "$( uname -m )" in +    i?86) ARCH=i486 ;; +    arm*) ARCH=arm ;; +    # Unless $ARCH is already set, use uname -m for all other archs: +       *) ARCH=$( uname -m ) ;; +  esac +fi + + +if ! getent passwd "test"; then +	echo "test user doesn't exist!" +	exit 1 +fi + +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-$ARCH-$BUILD$TAG.tgz diff --git a/t/LO-multilib/multilibsbowithcommandinreadme/multilibsbowithcommandinreadme.info b/t/LO-multilib/multilibsbowithcommandinreadme/multilibsbowithcommandinreadme.info new file mode 100644 index 0000000..4707c07 --- /dev/null +++ b/t/LO-multilib/multilibsbowithcommandinreadme/multilibsbowithcommandinreadme.info @@ -0,0 +1,10 @@ +PRGNAM="multilibsbowithcommandinreadme" +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"  | 
