X-Git-Url: https://ruderich.org/simon/gitweb/?p=blhc%2Fblhc.git;a=blobdiff_plain;f=t%2Ftests.t;h=95a8f40c830c43588b7686aab209851a4b35fac0;hp=7fc4f9e534a11f8ab724623fd1577808de1ce9ed;hb=c2dd74aada8d92258b14727c057e5d02a4c8c7a4;hpb=e9f80391175f1cdaba372f2c8fad2f861e9daaeb diff --git a/t/tests.t b/t/tests.t index 7fc4f9e..95a8f40 100644 --- a/t/tests.t +++ b/t/tests.t @@ -19,7 +19,7 @@ use strict; use warnings; -use Test::More tests => 110; +use Test::More tests => 112; sub is_blhc { @@ -31,7 +31,8 @@ sub is_blhc { $file = "@{$file}"; } - my $output = `./bin/blhc $options ./t/logs/$file 2>&1`; + $file = "./t/logs/$file" if $file; + my $output = `./bin/blhc $options $file 2>&1`; if ($options) { $options = ' '. $options; @@ -43,13 +44,17 @@ sub is_blhc { # Usage. -is_blhc 'empty', '--invalid', 2, - 'Unknown option: invalid -Usage: +my $usage = + 'Usage: blhc [*options*] *..* '; +is_blhc '', '--invalid', 2, + "Unknown option: invalid\n" + . $usage; +is_blhc '', '', 2, + $usage; # No compiler commands found.