The man page gives two examples combining -C and -q, but
these combinations are not yet tested. Add tests to help
ensure the documented examples continue to work.
#!/usr/bin/perl -w
-use Test::Command tests => 12;
+use Test::Command tests => 18;
# -c n count of pings to send to each target (default 1)
# -C n same as -c, report results in verbose format
});
}
+# fping -C n -q
+{
+my $cmd = Test::Command->new(cmd => "fping -C 5 -q -p 100 localhost");
+$cmd->exit_is_num(0);
+$cmd->stdout_is_eq("");
+$cmd->stderr_like(qr{localhost :( \d\.\d+){5}
+});
+}
+
+# fping -C n -i -q
+{
+my $cmd = Test::Command->new(cmd => "fping --quiet --interval=1 --vcount=20 --period=50 127.0.0.1 127.0.0.2");
+$cmd->exit_is_num(0);
+$cmd->stdout_is_eq("");
+$cmd->stderr_like(qr{127\.0\.0\.1 :( \d\.\d+){20}
+127\.0\.0\.2 :( \d\.\d+){20}
+});
+}
+
# fping -D
{
my $cmd = Test::Command->new(cmd => "fping -D -c 2 -p 100 127.0.0.1");