+++ /dev/null
-* Fix TODO tests
with 'Catalyst::ScriptRole';
-__PACKAGE__->meta->get_attribute('help')->cmd_aliases('h');
-
__PACKAGE__->meta->make_immutable;
=head1 NAME
with 'Catalyst::ScriptRole';
-__PACKAGE__->meta->get_attribute('help')->cmd_aliases('h');
-
has force => (
traits => [qw(Getopt)],
cmd_aliases => 'nonew',
with 'Catalyst::ScriptRole';
-__PACKAGE__->meta->get_attribute('help')->cmd_aliases('h');
-
has listen => (
traits => [qw(Getopt)],
cmd_aliases => 'l',
with 'Catalyst::ScriptRole';
+__PACKAGE__->meta->get_attribute('help')->cmd_aliases('?');
+
has debug => (
traits => [qw(Getopt)],
cmd_aliases => 'd',
with 'Catalyst::ScriptRole';
-__PACKAGE__->meta->get_attribute('help')->cmd_aliases('h');
-
sub run {
my $self = shift;
isa => Bool,
is => 'ro',
documentation => q{Display this help and exit},
+ cmd_aliases => ['?', 'h'],
);
sub _getopt_spec_exception {}
package TestHelpScript;
use Moose;
with 'Catalyst::ScriptRole';
- __PACKAGE__->meta->get_attribute('help')->cmd_aliases('h');
our $help;
- sub _exit_with_usage { $help++ }
+ sub _getopt_full_usage { $help++ }
}
test('-h');
test('--help');
-
-TODO: {
- local $TODO = 'This is bork';
- test('-?');
-}
+test('-?');
sub test {
local $TestHelpScript::help;
local @ARGV = (@_);
lives_ok {
TestHelpScript->new_with_options(application_name => 'TestAppToTestScripts')->run;
- };
- ok $TestHelpScript::help;
+ } 'Lives';
+ ok $TestHelpScript::help, 'Got help';
}
done_testing;