Test -l together with -Q or -t

pull/301/head
Erik Auerswald 11 months ago committed by David Schweikert
parent dcda0cc595
commit 32b9a55a98

@ -1,6 +1,6 @@
#!/usr/bin/perl -w #!/usr/bin/perl -w
use Test::Command tests => 12; use Test::Command tests => 15;
use Test::More; use Test::More;
# -i n interval between sending ping packets (in millisec) (default 25) # -i n interval between sending ping packets (in millisec) (default 25)
@ -50,6 +50,24 @@ $cmd->stderr_like(qr{\[\d+:\d+:\d+\]
}); });
} }
# fping -l -Q
{
my $cmd = Test::Command->new(cmd => '(sleep 2; pkill fping)& fping -p 850 -l -Q 1 127.0.0.1');
$cmd->stdout_is_eq("");
$cmd->stderr_like(qr{\[\d\d:\d\d:\d\d\]
127\.0\.0\.1 : xmt/rcv/%loss = \d/\d/\d%, min/avg/max = \d\.\d+/\d\.\d+/\d\.\d+
\[\d\d:\d\d:\d\d\]
127\.0\.0\.1 : xmt/rcv/%loss = \d/\d/\d%, min/avg/max = \d\.\d+/\d\.\d+/\d\.\d+
});
}
# fping -l -t
{
my $cmd = Test::Command->new(cmd => '(sleep 2; pkill fping)& fping -p 900 -t 1500 -l 127.0.0.1');
$cmd->stdout_like(qr{127\.0\.0\.1 : \[0\], 64 bytes, \d\.\d+ ms \(\d\.\d+ avg, 0% loss\)
127\.0\.0\.1 : \[1\], 64 bytes, \d\.\d+ ms \(\d\.\d+ avg, 0% loss\)
});
}
# fping -M # fping -M
SKIP: { SKIP: {

Loading…
Cancel
Save