From 32b9a55a98495e9d040fab6df7ca88ea8c4a80c7 Mon Sep 17 00:00:00 2001 From: Erik Auerswald Date: Tue, 6 Feb 2024 21:45:27 +0100 Subject: [PATCH] Test -l together with -Q or -t --- ci/test-07-options-i-m.pl | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/ci/test-07-options-i-m.pl b/ci/test-07-options-i-m.pl index 2eddc45..da442a2 100755 --- a/ci/test-07-options-i-m.pl +++ b/ci/test-07-options-i-m.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -use Test::Command tests => 12; +use Test::Command tests => 15; use Test::More; # -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 SKIP: { -- 2.43.0