From c9e2f9ce1d6092ba61368772dca67698f8663f12 Mon Sep 17 00:00:00 2001 From: David Schweikert Date: Mon, 13 Feb 2017 17:47:26 +0100 Subject: [PATCH] fix help test (and be less pedantic about help text changes) --- ci/test-02-help.pl | 41 +++-------------------------------------- 1 file changed, 3 insertions(+), 38 deletions(-) diff --git a/ci/test-02-help.pl b/ci/test-02-help.pl index 43ae7c5..8e0be8c 100755 --- a/ci/test-02-help.pl +++ b/ci/test-02-help.pl @@ -8,47 +8,12 @@ $I_HELP = '' if $^O eq 'darwin'; # fping -h my $cmd1 = Test::Command->new(cmd => "fping -h"); $cmd1->exit_is_num(0); -$cmd1->stdout_is_eq(<stdout_like(qr{Usage: fping \[options\] \[targets\.\.\.\] Probing options: - -4 only ping IPv4 addresses - -6 only ping IPv6 addresses - -b, --size=BYTES amount of ping data to send, in bytes (default 56) - -B, --backoff=N set exponential backoff factor to N - -c, --count=N count of pings to send to each target (default 1) - -f, --file=FILE read list of targets from a file ( - means stdin) - -g, --generate generate target list (only if no -f specified) - (give start and end IP in the target list, or a CIDR address) - (ex. fping -g 192.168.1.0 192.168.1.255 or fping -g 192.168.1.0/24) - -H, --ttl=N set the IP TTL value (Time To Live hops) -$I_HELP -l, --loop loop sending pings forever - -m, --all use all IPs of provided hostnames (e.g. IPv4 and IPv6), use with -A - -M, --dontfrag set the Don't Fragment flag - -O, --tos=N set the type of service (tos) flag on the ICMP packets - -p, --period=MSEC interval between ping packets to one target (in millisec) - (in looping and counting modes, default 1000) - -r, --retry=N number of retries (default 3) - -R, --random random packet data (to foil link data compression) - -S, --src=IP set source address - -t, --timeout=MSEC individual target initial timeout (in millisec) (default 500) - -Output options: - -a, --alive show targets that are alive - -A, --addr show targets by address - -C, --vcount=N same as -c, report results in verbose format - -D, --timestamp print timestamp before each output line - -e, --elapsed show elapsed time on return packets - -i, --interval=MSEC interval between sending ping packets (in ms) (default 25) - -n, --name show targets by name (-d is equivalent) - -N, --netdata output compatible for netdata (-l -Q are required) - -o, --outage show the accumulated outage time (lost packets * packet interval) - -q, --quiet quiet (don't show per-target/per-ping results) - -Q, --squiet=SECS same as -q, but show summary every n seconds - -s, --stats print final stats - -u, --unreach show targets that are unreachable +.* -v, --version show version -END +}s); $cmd1->stderr_is_eq(""); # fping -v -- 2.43.0