more tests

This commit is contained in:
David Schweikert 2014-05-03 00:06:07 +02:00
parent b779e14db6
commit e79444f09a
2 changed files with 3 additions and 5 deletions

View File

@ -1,8 +1,8 @@
#!/usr/bin/perl -w
use Test::Command tests => 33;
use Test::Command tests => 36;
for my $arg (qw(i B c C H i O p Q r t)) {
for my $arg (qw(i b B c C H i O p Q r t)) {
my $cmd = Test::Command->new(cmd => "fping -$arg xxx");
$cmd->exit_is_num(1);
$cmd->stdout_is_eq("");

View File

@ -424,9 +424,7 @@ int main( int argc, char **argv )
break;
case 'b':
errno = 0;
ping_data_size = (unsigned int) strtol(optarg, (char **)NULL, 10);
if( errno )
if (!sscanf(optarg,"%i",&ping_data_size))
usage(1);
break;