#!/usr/bin/perl -w
-use Test::Command tests => 45;
+use Test::Command tests => 51;
+use Test::More;
use File::Temp;
# -f file read list of targets from a file ( - means stdin) (only if no -g specified)
$cmd->stderr_is_eq("fping: netmask must be between 1 and 32 (is: 0)\n");
}
+# fping -g (range - no IPv6 generator)
+SKIP: {
+ if($ENV{SKIP_IPV6}) {
+ skip 'Skip IPv6 tests', 3;
+ }
+ my $cmd = Test::Command->new(cmd => "fping -6 -g ::1 ::1");
+ $cmd->exit_is_num(1);
+ $cmd->stdout_is_eq("");
+ $cmd->stderr_is_eq("fping: -g works only with IPv4 addresses\n");
+}
+
+# fping -g (CIDR - no IPv6 generator)
+SKIP: {
+ if($ENV{SKIP_IPV6}) {
+ skip 'Skip IPv6 tests', 3;
+ }
+ my $cmd = Test::Command->new(cmd => "fping -6 -g ::1/128");
+ $cmd->exit_is_num(1);
+ $cmd->stdout_is_eq("");
+ $cmd->stderr_is_eq("fping: -g works only with IPv4 addresses\n");
+}
+
# fping -H
{
my $cmd = Test::Command->new(cmd => "fping -H 1 127.0.0.1");