[Catalyst-commits] r11924 -
Catalyst-Runtime/5.80/branches/better_scripts/t/aggregate
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Fri Nov 20 00:00:04 GMT 2009
Author: t0m
Date: 2009-11-20 00:00:02 +0000 (Fri, 20 Nov 2009)
New Revision: 11924
Modified:
Catalyst-Runtime/5.80/branches/better_scripts/t/aggregate/unit_core_script_help.t
Catalyst-Runtime/5.80/branches/better_scripts/t/aggregate/unit_core_script_server.t
Log:
More tests for help, proving it's still bork
Modified: Catalyst-Runtime/5.80/branches/better_scripts/t/aggregate/unit_core_script_help.t
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/t/aggregate/unit_core_script_help.t 2009-11-19 23:48:42 UTC (rev 11923)
+++ Catalyst-Runtime/5.80/branches/better_scripts/t/aggregate/unit_core_script_help.t 2009-11-20 00:00:02 UTC (rev 11924)
@@ -2,6 +2,7 @@
use strict;
use warnings;
use Test::More;
+use Test::Exception;
use FindBin qw/$Bin/;
use lib "$Bin/../lib";
@@ -13,17 +14,22 @@
our $help;
sub _exit_with_usage { $help++ }
}
-{
- local $TestHelpScript::help;
- local @ARGV = ('-h');
- TestHelpFromScriptCGI->new_with_options(application_name => 'TestAppToTestScripts')->run;
- ok $TestHelpFromScriptCGI::help, 1;
+
+test('-h');
+test('--help');
+
+TODO: {
+ local $TODO = 'This is bork';
+ test('-?');
}
-{
+
+sub test {
local $TestHelpScript::help;
- local @ARGV = ('--help');
- TestHelpFromScriptCGI->new_with_options(application_name => 'TestAppToTestScripts')->run;
- is $TestHelpFromScriptCGI::help, 2;
+ local @ARGV = (@_);
+ lives_ok {
+ TestHelpScript->new_with_options(application_name => 'TestAppToTestScripts')->run;
+ };
+ ok $TestHelpScript::help;
}
done_testing;
Modified: Catalyst-Runtime/5.80/branches/better_scripts/t/aggregate/unit_core_script_server.t
===================================================================
--- Catalyst-Runtime/5.80/branches/better_scripts/t/aggregate/unit_core_script_server.t 2009-11-19 23:48:42 UTC (rev 11923)
+++ Catalyst-Runtime/5.80/branches/better_scripts/t/aggregate/unit_core_script_server.t 2009-11-20 00:00:02 UTC (rev 11924)
@@ -16,7 +16,7 @@
# Old version supports long format opts with either one or two dashes. New version only supports two.
# Old New
-# help -? -help --help -h --help
+# help -? -help --help -? --help
# debug -d -debug --debug -d --debug
# host -host --host --host
testOption( [ qw/--host testhost/ ], ['3000', 'testhost', opthash()] );
More information about the Catalyst-commits
mailing list