Fix FTBFS with Geopt::Long::Descriptive 0.100

This commit is contained in:
Paul Howarth 2016-07-12 14:29:28 +01:00
parent ca20faf4c7
commit 6024c981c3
2 changed files with 56 additions and 1 deletions

View File

@ -0,0 +1,47 @@
--- t/104_override_usage.t
+++ t/104_override_usage.t
@@ -49,10 +49,16 @@ use Test::Exception;
\t--foo A foo
}
:
+ $Getopt::Long::Descriptive::VERSION == 0.099 ?
qq{usage: 104_override_usage.t [-?] [long options...]
\t-? --usage --help Prints this usage information.
\t--foo INT A foo
}
+ :
+ qq{usage: 104_override_usage.t [-?] [long options...]
+\t-? --usage --help Prints this usage information.
+\t--foo INT A foo
+}
];
--- t/110_sort_usage_by_attr_order.t
+++ t/110_sort_usage_by_attr_order.t
@@ -34,7 +34,7 @@ usage: 110_sort_usage_by_attr_order.t [-
--bar Documentation for "bar"
--baz Documentation for "baz"
USAGE
-if ( $Getopt::Long::Descriptive::VERSION >= 0.099 )
+if ( $Getopt::Long::Descriptive::VERSION == 0.099 )
{
$expected = <<'USAGE';
usage: 110_sort_usage_by_attr_order.t [-?] [long options...]
@@ -44,6 +44,16 @@ usage: 110_sort_usage_by_attr_order.t [-
--baz STR Documentation for "baz"
USAGE
}
+if ( $Getopt::Long::Descriptive::VERSION >= 0.100 )
+{
+$expected = <<'USAGE';
+usage: 110_sort_usage_by_attr_order.t [-?] [long options...]
+ -? --usage --help Prints this usage information.
+ --foo STR Documentation for "foo"
+ --bar STR Documentation for "bar"
+ --baz STR Documentation for "baz"
+USAGE
+}
$expected =~ s/^[ ]{4}/\t/xmsg;
is($obj->usage->text, $expected, 'Usage text has nicely sorted options');

View File

@ -1,10 +1,11 @@
Name: perl-MouseX-Getopt
Summary: Mouse role for processing command line options
Version: 0.36
Release: 7%{?dist}
Release: 8%{?dist}
License: GPL+ or Artistic
URL: http://search.cpan.org/dist/MouseX-Getopt/
Source0: http://search.cpan.org/CPAN/authors/id/G/GF/GFUJI/MouseX-Getopt-%{version}.tar.gz
Patch0: MouseX-Getopt-0.36-GLD-spacing.patch
BuildArch: noarch
# Module Build
BuildRequires: perl
@ -51,6 +52,10 @@ objects using parameters passed in from the command line.
%prep
%setup -q -n MouseX-Getopt-%{version}
# Fix tests for GLD help output again
# https://github.com/gfx/mousex-getopt/pull/10
%patch0
%build
perl Build.PL --installdirs=vendor
./Build
@ -78,6 +83,9 @@ perl Build.PL --installdirs=vendor
%{_mandir}/man3/MouseX::Getopt::Strict.3*
%changelog
* Tue Jul 12 2016 Paul Howarth <paul@city-fan.org> - 0.36-8
- Fix FTBFS with Geopt::Long::Descriptive 0.100
* Wed May 18 2016 Jitka Plesnikova <jplesnik@redhat.com> - 0.36-7
- Perl 5.24 re-rebuild of bootstrapped packages