collapse these tests together
[gitmo/MooseX-Getopt.git] / t / 109_help_flag.t
index eb75961..33390de 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env perl
-
 # The documentation claims:
 #   If Getopt::Long::Descriptive is installed and any of the following command
 #   line params are passed (--help, --usage, --?), the program will exit with
@@ -19,7 +17,8 @@
 # Update: since 0.41, usage info is printed to stdout, not stderr.
 
 use strict; use warnings;
-use Test::More tests => 18;
+use Test::More tests => 23;
+use Test::NoWarnings 1.04 ':early';
 use Test::Trap;
 
 {
@@ -42,7 +41,7 @@ ok($obj->meta->has_attribute('usage'), 'class has usage attribute');
 isa_ok($obj->usage, 'Getopt::Long::Descriptive::Usage');
 my $usage_text = $obj->usage->text;
 
-foreach my $args ( ['--help'], ['--usage'], ['--?'], ['-?'] )
+foreach my $args ( ['--help'], ['--usage'], ['--?'], ['-?'], ['-h'] )
 {
     local @ARGV = @$args;
     note "Setting \@ARGV to @$args";