commit b71b07f49dc22f83af955fc5fc6d870df4f11bb5
parent 4f5d0d9b10e7f88549df6d8fc073e3af5ad8903b
Author: Andreas Guldstrand <andreas.guldstrand@gmail.com>
Date: Fri, 2 Sep 2016 01:00:22 +0200
04-install.t: add test for compat32 on fake 32bit
Diffstat:
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git 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
@@ -0,0 +1,2 @@
+#!/bin/bash
+echo "i586"