X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;ds=sidebyside;f=t%2Ftests.t;h=95a8f40c830c43588b7686aab209851a4b35fac0;hb=c2dd74aada8d92258b14727c057e5d02a4c8c7a4;hp=7fc4f9e534a11f8ab724623fd1577808de1ce9ed;hpb=53e64de60f08fcb752b1f3ccb41c9e8555be8866;p=blhc%2Fblhc.git 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.