X-Git-Url: https://ruderich.org/simon/gitweb/?p=blhc%2Fblhc.git;a=blobdiff_plain;f=t%2Ftests.t;h=648afb40715279cbdde047e614ba7ae94e561726;hp=b781bfe368ba53b1a078ade08b9843aac5d4e7c2;hb=ec2b4beb8fdc976b98d31c1f2d85db6b59115580;hpb=78f7218d807b87ede58fca00ca672ce597e2145e diff --git a/t/tests.t b/t/tests.t index b781bfe..648afb4 100644 --- a/t/tests.t +++ b/t/tests.t @@ -1,6 +1,6 @@ # Tests for blhc. # -# Copyright (C) 2012-2015 Simon Ruderich +# Copyright (C) 2012-2016 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 @@ -48,11 +48,17 @@ sub is_blhc { # Usage, invalid arguments. -my $usage = +use Pod::Usage; +my $usage = ( $Pod::Usage::VERSION < 1.65 ? 'Usage: blhc [*options*] *..* -'; +' + : + 'Usage: + blhc [options] .. + +'); is_blhc '', '--invalid', 2, "Unknown option: invalid\n" . $usage; @@ -61,7 +67,7 @@ is_blhc '', '', 2, $usage; is_blhc '', '--version', 0, - 'blhc 0.05 Copyright (C) 2012-2015 Simon Ruderich + 'blhc 0.07 Copyright (C) 2012-2016 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 @@ -79,7 +85,7 @@ along with this program. If not, see . is_blhc '', '--help', 1, qr/^Usage: - blhc \[\*options\*\] \*\.\.\* + blhc \[\*?options\*?\] \*?\.\.\*? Options: /s; @@ -118,23 +124,14 @@ is_blhc 'ignore-flag-ldflags', '--ignore-flag -fPIE', 0, # Invalid option. is_blhc 'ignore-flag', '--ignore-arch-flag -g', 2, - 'Value "-g" invalid for option ignore-arch-flag ("arch:flag" expected) -Usage: - blhc [*options*] *..* - -'; + 'Value "-g" invalid for option ignore-arch-flag ("arch:flag" expected)' + . "\n$usage"; is_blhc 'ignore-flag', '--ignore-arch-flag -g:', 2, - 'Value "-g:" invalid for option ignore-arch-flag ("arch:flag" expected) -Usage: - blhc [*options*] *..* - -'; + 'Value "-g:" invalid for option ignore-arch-flag ("arch:flag" expected)' + . "\n$usage"; is_blhc 'ignore-flag', '--ignore-arch-flag :amd64', 2, - 'Value ":amd64" invalid for option ignore-arch-flag ("arch:flag" expected) -Usage: - blhc [*options*] *..* - -'; + 'Value ":amd64" invalid for option ignore-arch-flag ("arch:flag" expected)' + . "\n$usage"; # Wrong architecture. is_blhc 'ignore-flag', '--ignore-arch-flag amd64:-g', 8, @@ -181,23 +178,14 @@ is_blhc 'ignore-line', '--ignore-line "\./prepare-script gcc test-[a-z]\.c" --ig # Invalid option. is_blhc 'ignore-line', '--ignore-arch-line .+', 2, - 'Value ".+" invalid for option ignore-arch-line ("arch:line" expected) -Usage: - blhc [*options*] *..* - -'; + 'Value ".+" invalid for option ignore-arch-line ("arch:line" expected)' + . "\n$usage"; is_blhc 'ignore-line', '--ignore-arch-line .+:', 2, - 'Value ".+:" invalid for option ignore-arch-line ("arch:line" expected) -Usage: - blhc [*options*] *..* - -'; + 'Value ".+:" invalid for option ignore-arch-line ("arch:line" expected)' + . "\n$usage"; is_blhc 'ignore-line', '--ignore-arch-line :amd64', 2, - 'Value ":amd64" invalid for option ignore-arch-line ("arch:line" expected) -Usage: - blhc [*options*] *..* - -'; + 'Value ":amd64" invalid for option ignore-arch-line ("arch:line" expected)' + . "\n$usage"; # Wrong architecture. is_blhc 'ignore-line', '--ignore-arch-line "amd64:.+"', 8, @@ -644,6 +632,7 @@ NONVERBOSE BUILD: [ 82%] Building C object src/CMakeFiles/test/test.c.o CXXFLAGS missing (-Wformat): cd /tmp/test/src && /usr/bin/c++ -g -O2 -fstack-protector-strong -Wformat-security -Werror=format-security -o CMakeFiles/test-verbose.dir/verbose.cpp.o -c -D_FORTIFY_SOURCE=2 /tmp/test/src/test-verbose/verbose.cpp CFLAGS missing (-Werror=format-security): cd /tmp/test/src && /usr/bin/gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -o CMakeFiles/test-verbose-c.dir/verbose-c.c.o -c -D_FORTIFY_SOURCE=2 /tmp/test/src/test-verbose-c/verbose-c.c NONVERBOSE BUILD: Compiling test.c \ gcc test.c +NONVERBOSE BUILD: [ 3%] Building CXX object scribus/text/CMakeFiles/scribus_text_lib.dir/frect.cpp.o '; @@ -762,11 +751,13 @@ LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): g++-4.6 -Wl,-z,defs -o tes my $ada = 'CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc-4.6 -c -fPIC -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security test.c LDFLAGS missing (-Wl,-z,relro): /usr/bin/gcc-4.6 -shared -lgnat-4.6 -o libtest.so.2 test-a.o test-b.o test-c.o -Wl,--as-needed -CFLAGS missing (-fstack-protector-strong -Wformat -Werror=format-security): gcc -c -g -O2 test.c +CFLAGS missing (-fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc -c -g -O2 test.c CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -c -g -O2 test.c -CFLAGS missing (-fstack-protector-strong -Wformat -Werror=format-security): gcc -g -O2 test.c +CFLAGS missing (-fPIE -fstack-protector-strong -Wformat -Werror=format-security): gcc -g -O2 test.c CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 test.c -LDFLAGS missing (-Wl,-z,relro): gcc -g -O2 test.c +LDFLAGS missing (-fPIE -pie -Wl,-z,relro): gcc -g -O2 test.c +CFLAGS missing (-fstack-protector-strong): gcc-6 -c -I./ -I../progs -g -O2 -fPIE -gnat2005 -gnato -gnatVa -fstack-check -gnatw.I -I- -o /«PKGBUILDDIR»/build/objects/arm_frm.o /«PKGBUILDDIR»/progs/arm_frm.adb +CFLAGS missing (-fstack-protector-strong): gcc-6 -c -I./ -I../progs -g -O2 -fPIE -gnat2005 -gnato -gnatVa -fstack-check -I- -x ada -o /«PKGBUILDDIR»/build/objects/arm_form.o /«PKGBUILDDIR»/progs/arm_form.ada '; is_blhc 'ada', '', 8, $ada;