# Tests for blhc.
#
-# Copyright (C) 2012-2016 Simon Ruderich
+# Copyright (C) 2012-2017 Simon Ruderich
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
use strict;
use warnings;
-use Test::More tests => 216;
+use Test::More tests => 226;
sub is_blhc {
$usage;
is_blhc '', '--version', 0,
- 'blhc 0.07 Copyright (C) 2012-2016 Simon Ruderich
+ 'blhc 0.07 Copyright (C) 2012-2017 Simon Ruderich
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
$ada;
+# fortran
+
+is_blhc 'fortran', '', 8,
+ 'CFLAGS missing (-fstack-protector-strong): gfortran -g -w -O2 -Wtabs -ffixed-line-length-132 -Wl,-z,relro -o balls balls.f
+CFLAGS missing (-fstack-protector-strong): gfortran -g -w -O2 -Wtabs -ffixed-line-length-132 -c -o quadric.o quadric.f
+CFLAGS missing (-fstack-protector-strong): gfortran -g -w -O2 -Wtabs -ffixed-line-length-132 -c -o suv.o suv.f
+CFLAGS missing (-fstack-protector-strong): gfortran -g -w -O2 -Wtabs -ffixed-line-length-132 \ rastep.f quadric.o suv.o -Wl,-z,relro \ -o rastep
+CFLAGS missing (-fstack-protector-strong): gfortran -g -w -O2 -Wtabs -ffixed-line-length-132 -c -o render.o render.f
+LDFLAGS missing (-Wl,-z,relro): gfortran -g -w -O2 -Wtabs -ffixed-line-length-132 -fstack-protector-strong -o balls-without-ldflags balls.f
+CFLAGS missing (-fstack-protector-strong): mpifort -cpp -DDOUB -g -O2 -fdebug-prefix-map=/«PKGBUILDDIR»=. -c -o transform.o transform.f90
+';
+
+
# libtool
is_blhc 'libtool', '--bindnow', 12,
'W-dpkg-buildflags-missing|CFLAGS 3 (of 6), CXXFLAGS 1 (of 1) missing|
';
+is_blhc 'buildd-gcc-pie', '--buildd --all', 0,
+ 'W-dpkg-buildflags-missing|CFLAGS 1 (of 1), LDFLAGS 1 (of 1) missing|
+';
+is_blhc 'buildd-gcc-pie-builtin-wrong-arch', '--buildd --all', 0,
+ 'W-dpkg-buildflags-missing|CFLAGS 1 (of 1), LDFLAGS 1 (of 1) missing|
+';
+is_blhc 'buildd-gcc-pie-builtin', '--buildd', 0, '';
+is_blhc 'buildd-gcc-pie-builtin', '--buildd --all', 0, '';
+
# Older dpkg versions use -fstack-protector instead of -strong.
is_blhc 'buildd-dpkg-fstack-protector', '--buildd', 0,
'';