From: David Schweikert Date: Sun, 4 May 2014 19:54:59 +0000 (+0200) Subject: more tests X-Git-Url: https://git.gsnw.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe12f0dbabeb351423edec1a7df87b6086064ec0;p=fping.git more tests --- diff --git a/ci/test-14-ping-internet-hosts.pl b/ci/test-14-ping-internet-hosts.pl new file mode 100755 index 0000000..249f02c --- /dev/null +++ b/ci/test-14-ping-internet-hosts.pl @@ -0,0 +1,15 @@ +#!/usr/bin/perl -w + +use Test::Command tests => 3; + +# fping +{ +my $cmd = Test::Command->new(cmd => "fping -q -i 10 -p 20 -c 3 -t200 8.8.8.8 4.2.2.5 www.france-telecom.fr www.google.com"); +$cmd->exit_is_num(0); +$cmd->stdout_is_eq(""); +$cmd->stderr_like(qr{8\.8\.8\.8\s*: xmt/rcv/%loss = [123]/3/\d+%, min/avg/max = \d+\.\d+/\d+\.\d+/\d+\.\d+ +4\.2\.2\.5\s*: xmt/rcv/%loss = [123]/3/\d+%, min/avg/max = \d+\.\d+/\d+\.\d+/\d+\.\d+ +www\.france-telecom\.fr\s*: xmt/rcv/%loss = [123]/3/\d+%, min/avg/max = \d+\.\d+/\d+\.\d+/\d+\.\d+ +www\.google\.com\s*: xmt/rcv/%loss = [123]/3/\d+%, min/avg/max = \d+\.\d+/\d+\.\d+/\d+\.\d+ +}); +}