X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=t%2Ftests.t;h=bb8471b60c5f0608e46bbb82e8875ea8fc22610e;hb=bd14bca33d2d8a8b2b296a62f2e13292a3f58068;hp=1be74958fed9fef8df9a5b0caccda36de95de458;hpb=36c9f05a7471f321df247f0237ac8efa81d69207;p=blhc%2Fblhc.git diff --git a/t/tests.t b/t/tests.t index 1be7495..bb8471b 100644 --- a/t/tests.t +++ b/t/tests.t @@ -19,7 +19,7 @@ use strict; use warnings; -use Test::More tests => 98; +use Test::More tests => 102; sub is_blhc { @@ -46,16 +46,7 @@ sub is_blhc { is_blhc 'empty', '--invalid', 2, 'Unknown option: invalid Usage: - blhc [options] .. - - --all force +all (+pie, +bindnow) check - --arch set architecture (autodetected) - --bindnow force +bindbow check - --buildd parser mode for buildds - --color use colored output - --pie force +pie check - --help available options - --version version number and license + blhc [*options*] *..* '; @@ -582,32 +573,26 @@ is_blhc 'debian-hardening-wrapper', '', 16, # buildd support +is_blhc 'empty', '--buildd', 1, + 'W-no-compiler-commands +'; + is_blhc 'buildd-package-details', '--buildd', 0, ''; is_blhc 'buildd-dpkg-dev', '--buildd', 8, - 'CFLAGS missing (-fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security): gcc -g -O2 -c test-a.c -CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -c test-a.c -CFLAGS missing (-fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security): gcc -g -O2 -c test-b.c -CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -c test-b.c -CFLAGS missing (-fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security): gcc -g -O2 -c test-c.c -CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -c test-c.c -LDFLAGS missing (-Wl,-z,relro): gcc -o test test-a.o test-b.o test-c.o -ltest -CFLAGS missing (-O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security): gcc -g -c test-a.c -CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -c test-a.c -CFLAGS missing (-O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security): gcc -g -c test-b.c -CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -c test-b.c -CFLAGS missing (-O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security): gcc -g -c test-c.c -CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -c test-c.c -LDFLAGS missing (-Wl,-z,relro): gcc -o test test-a.o test-b.o test-c.o -ltest + 'W-dpkg-buildflags-missing CPPFLAGS 7 (of 7), CFLAGS 6 (of 6), CXXFLAGS 1 (of 1), LDFLAGS 2 (of 2) missing '; is_blhc 'buildd-dpkg-dev-old', '--buildd', 8, - 'CFLAGS missing (-O2): gcc -g -c test-a.c -CFLAGS missing (-O2): gcc -g -c test-b.c -CFLAGS missing (-O2): gcc -g -c test-c.c + 'W-dpkg-buildflags-missing CFLAGS 3 (of 6), CXXFLAGS 1 (of 1) missing '; +is_blhc 'buildd-verbose-build', '--buildd', 4, + 'W-compiler-flags-hidden 1 (of 5) hidden +'; + + # multiple files is_blhc ['good', 'good-pie', 'good-bindnow', 'good-all', 'good-multiline', 'good-library'], '', 0,