From: Gregor Herrmann Date: Sun, 5 Jun 2016 10:27:25 +0000 (+0200) Subject: Update t/tests.t for new output of Pod::Usage in 1.65 X-Git-Tag: 0.06~4 X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=4c5b4aedc1dcf125701393371013c47c35c7772b;p=blhc%2Fblhc.git Update t/tests.t for new output of Pod::Usage in 1.65 [SR: Closes Debian bug #825428.] --- diff --git a/t/tests.t b/t/tests.t index fb29366..5f9661e 100644 --- a/t/tests.t +++ b/t/tests.t @@ -48,11 +48,17 @@ sub is_blhc { # Usage, invalid arguments. -my $usage = +use Pod::Usage; +my $usage = ( $Pod::Usage::VERSION < 1.65 ? 'Usage: blhc [*options*] *..* -'; +' + : + 'Usage: + blhc [options] .. + +'); is_blhc '', '--invalid', 2, "Unknown option: invalid\n" . $usage; @@ -79,7 +85,7 @@ along with this program. If not, see . is_blhc '', '--help', 1, qr/^Usage: - blhc \[\*options\*\] \*\.\.\* + blhc \[\*?options\*?\] \*?\.\.\*? Options: /s; @@ -118,23 +124,14 @@ is_blhc 'ignore-flag-ldflags', '--ignore-flag -fPIE', 0, # Invalid option. is_blhc 'ignore-flag', '--ignore-arch-flag -g', 2, - 'Value "-g" invalid for option ignore-arch-flag ("arch:flag" expected) -Usage: - blhc [*options*] *..* - -'; + 'Value "-g" invalid for option ignore-arch-flag ("arch:flag" expected)' + . "\n$usage"; is_blhc 'ignore-flag', '--ignore-arch-flag -g:', 2, - 'Value "-g:" invalid for option ignore-arch-flag ("arch:flag" expected) -Usage: - blhc [*options*] *..* - -'; + 'Value "-g:" invalid for option ignore-arch-flag ("arch:flag" expected)' + . "\n$usage"; is_blhc 'ignore-flag', '--ignore-arch-flag :amd64', 2, - 'Value ":amd64" invalid for option ignore-arch-flag ("arch:flag" expected) -Usage: - blhc [*options*] *..* - -'; + 'Value ":amd64" invalid for option ignore-arch-flag ("arch:flag" expected)' + . "\n$usage"; # Wrong architecture. is_blhc 'ignore-flag', '--ignore-arch-flag amd64:-g', 8, @@ -181,23 +178,14 @@ is_blhc 'ignore-line', '--ignore-line "\./prepare-script gcc test-[a-z]\.c" --ig # Invalid option. is_blhc 'ignore-line', '--ignore-arch-line .+', 2, - 'Value ".+" invalid for option ignore-arch-line ("arch:line" expected) -Usage: - blhc [*options*] *..* - -'; + 'Value ".+" invalid for option ignore-arch-line ("arch:line" expected)' + . "\n$usage"; is_blhc 'ignore-line', '--ignore-arch-line .+:', 2, - 'Value ".+:" invalid for option ignore-arch-line ("arch:line" expected) -Usage: - blhc [*options*] *..* - -'; + 'Value ".+:" invalid for option ignore-arch-line ("arch:line" expected)' + . "\n$usage"; is_blhc 'ignore-line', '--ignore-arch-line :amd64', 2, - 'Value ":amd64" invalid for option ignore-arch-line ("arch:line" expected) -Usage: - blhc [*options*] *..* - -'; + 'Value ":amd64" invalid for option ignore-arch-line ("arch:line" expected)' + . "\n$usage"; # Wrong architecture. is_blhc 'ignore-line', '--ignore-arch-line "amd64:.+"', 8,