Created
March 28, 2015 22:20
-
-
Save hartzell/dc5e258b27d7c976f194 to your computer and use it in GitHub Desktop.
Fixes to mousex-getopt tests to handle underlying changes to getopt-long-descriptive.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
allons:tmp georgewh$ diff -u -r mousex-getopt-0.35 mousex-getopt-0.35.BORKED | |
Only in mousex-getopt-0.35: Build | |
Only in mousex-getopt-0.35: MYMETA.json | |
Only in mousex-getopt-0.35: MYMETA.yml | |
Only in mousex-getopt-0.35: _build | |
Only in mousex-getopt-0.35: blib | |
diff -u -r mousex-getopt-0.35/t/104_override_usage.t mousex-getopt-0.35.BORKED/t/104_override_usage.t | |
--- mousex-getopt-0.35/t/104_override_usage.t 2015-03-28 15:13:44.000000000 -0700 | |
+++ mousex-getopt-0.35.BORKED/t/104_override_usage.t 2014-03-10 00:02:07.000000000 -0700 | |
@@ -44,8 +44,8 @@ | |
'Unknown option: q | |
', | |
qq{usage: 104_override_usage.t [-?] [long options...] | |
-\t-? --usage --help Prints this usage information. | |
-\t--foo INT A foo | |
+\t-? --usage --help Prints this usage information. | |
+\t--foo A foo | |
} | |
]; | |
diff -u -r mousex-getopt-0.35/t/107_no_auto_help.t mousex-getopt-0.35.BORKED/t/107_no_auto_help.t | |
--- mousex-getopt-0.35/t/107_no_auto_help.t 2015-03-28 15:14:39.000000000 -0700 | |
+++ mousex-getopt-0.35.BORKED/t/107_no_auto_help.t 2014-03-10 00:02:07.000000000 -0700 | |
@@ -60,7 +60,7 @@ | |
warning_like { | |
throws_ok { Class->new_with_options } | |
#usage: 107_no_auto_help.t [-?] [long options...] | |
- qr/^usage: [\d\w]+\Q.t [-?] [long options...]\E.\s+\Q-? --usage --help Prints this usage information.\E.\s+--configfile/ms, | |
+ qr/^usage: [\d\w]+\Q.t [-?] [long options...]\E.\s+\Q-? --usage --help Prints this usage information.\E.\s+--configfile/ms, | |
'usage information looks good'; | |
} | |
qr/^Specified configfile \'this_value_unimportant\' does not exist, is empty, or is not readable$/, | |
diff -u -r mousex-getopt-0.35/t/109_help_flag.t mousex-getopt-0.35.BORKED/t/109_help_flag.t | |
--- mousex-getopt-0.35/t/109_help_flag.t 2015-03-28 15:16:32.000000000 -0700 | |
+++ mousex-getopt-0.35.BORKED/t/109_help_flag.t 2014-03-10 00:02:07.000000000 -0700 | |
@@ -40,7 +40,7 @@ | |
local @ARGV = @$args; | |
throws_ok { MyClass->new_with_options() } | |
- qr/^usage: (?:[\d\w]+)\Q.t [-?] [long options...]\E.^\t\Q-? --usage --help Prints this usage information.\E$/ms, | |
+ qr/^usage: (?:[\d\w]+)\Q.t [-?] [long options...]\E.^\t\Q-? --usage --help Prints this usage information.\E$/ms, | |
'Help request detected; usage information properly printed'; | |
} | |
diff -u -r mousex-getopt-0.35/t/110_sort_usage_by_attr_order.t mousex-getopt-0.35.BORKED/t/110_sort_usage_by_attr_order.t | |
--- mousex-getopt-0.35/t/110_sort_usage_by_attr_order.t 2015-03-28 15:17:34.000000000 -0700 | |
+++ mousex-getopt-0.35.BORKED/t/110_sort_usage_by_attr_order.t 2014-03-10 00:02:07.000000000 -0700 | |
@@ -29,10 +29,10 @@ | |
my $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 --help Prints this usage information. | |
+ --foo Documentation for "foo" | |
+ --bar Documentation for "bar" | |
+ --baz Documentation for "baz" | |
USAGE | |
$expected =~ s/^[ ]{4}/\t/xmsg; | |
is($obj->usage->text, $expected, 'Usage text has nicely sorted options'); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment