From b71b07f49dc22f83af955fc5fc6d870df4f11bb5 Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Fri, 2 Sep 2016 01:00:22 +0200 Subject: 04-install.t: add test for compat32 on fake 32bit --- t/04-install.t | 9 ++++++++- t/bin/uname | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100755 t/bin/uname diff --git a/t/04-install.t b/t/04-install.t index 93c0460..ea7b07c 100755 --- a/t/04-install.t +++ b/t/04-install.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 => 19; + plan tests => 20; } else { plan skip_all => 'Only run these tests if TEST_INSTALL=1'; } @@ -105,6 +105,13 @@ sboinstall 'perl-nonexistentcpan', { input => "n", expected => qr/Proceed with p is((stat($sbo))[1], $inode, "inode didn't change"); } +# 20: check correct exit for compat32 on fake 32bit +{ + local $ENV{PATH} = "$RealBin/bin:$ENV{PATH}"; + + sboinstall '-p', 'foo', { expected => "compat32 only works on x86_64.\n", exit => 1 }; +} + # Cleanup END { cleanup(); diff --git a/t/bin/uname b/t/bin/uname new file mode 100755 index 0000000..10dae37 --- /dev/null +++ b/t/bin/uname @@ -0,0 +1,2 @@ +#!/bin/bash +echo "i586" -- cgit v1.2.3