more tests

pull/67/head
David Schweikert 11 years ago
parent 1d576326ba
commit c9f276b3cd

@ -0,0 +1,10 @@
#!/usr/bin/perl -w
use Test::Command tests => 33;
for my $arg (qw(i 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("");
$cmd->stderr_like(qr{Usage:});
}

@ -392,7 +392,8 @@ int main( int argc, char **argv )
break;
case 'r':
retry = ( unsigned int )atoi( optarg );
if(!(retry = ( unsigned int )atoi( optarg )))
usage(1);
break;
case 'i':
@ -550,6 +551,9 @@ int main( int argc, char **argv )
perror("setting type of service octet IP_TOS");
}
}
else {
usage(1);
}
break;
default:
fprintf(stderr, "see 'fping -h' for usage information\n");

Loading…
Cancel
Save