--- /dev/null
+#!/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:});
+}
break;
case 'r':
- retry = ( unsigned int )atoi( optarg );
+ if(!(retry = ( unsigned int )atoi( optarg )))
+ usage(1);
break;
case 'i':
perror("setting type of service octet IP_TOS");
}
}
+ else {
+ usage(1);
+ }
break;
default:
fprintf(stderr, "see 'fping -h' for usage information\n");