]> ruderich.org/simon Gitweb - blhc/blhc.git/blobdiff - t/tests.t
Fix architecture detection when checking multiple files.
[blhc/blhc.git] / t / tests.t
index a4ccf604757fccd969d96b6e95abdfb59bd40f97..0b98fe3648a00e9be9a70b02bbc605d6308642be 100644 (file)
--- a/t/tests.t
+++ b/t/tests.t
@@ -19,7 +19,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 108;
+use Test::More tests => 110;
 
 
 sub is_blhc {
@@ -531,15 +531,19 @@ my $arch_avr32 =
 is_blhc 'arch-avr32', '', 8,
         $arch_avr32;
 
-is_blhc 'arch-i386', '', 8,
+my $arch_i386 =
         'CFLAGS missing (-fstack-protector): gcc -D_FORTIFY_SOURCE=2 -g -O2 -fPIE --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -c test.c
 LDFLAGS missing (-pie): gcc -fPIE -Wl,-z,relro -Wl,-z,now -o test test.o
 ';
+is_blhc 'arch-i386', '', 8,
+        $arch_i386;
 
-is_blhc 'arch-ia64', '', 8,
+my $arch_ia64 =
         'CFLAGS missing (-fPIE): gcc -D_FORTIFY_SOURCE=2 -g -O2 -Wformat -Wformat-security -Werror=format-security -Wall -c test.c
 LDFLAGS missing (-pie): gcc -fPIE -o test test.o
 ';
+is_blhc 'arch-ia64', '', 8,
+        $arch_ia64;
 
 is_blhc 'arch-mipsel', '', 8,
         'CFLAGS missing (-Werror=format-security): gcc -D_FORTIFY_SOURCE=2 -g -O2 -Wformat -Wformat-security -Wall -c test.c
@@ -613,6 +617,9 @@ is_blhc ['good', 'good-pie', 'good-bindnow', 'good-all', 'good-multiline', 'good
 is_blhc ['good-all', 'good-library'], '--all', 0,
         '';
 
+is_blhc ['arch-i386', 'arch-ia64'], '', 8,
+        $arch_i386 . $arch_ia64;
+
 # No exit when multiple files are specified.
 is_blhc ['bad-ldflags', 'empty', 'arch-avr32', 'debian-hardening-wrapper'], '', 25,
         $bad_ldflags