diff options
-rw-r--r-- | pod/perlrun.pod | 7 | ||||
-rw-r--r-- | t/run/switches.t | 8 |
2 files changed, 12 insertions, 3 deletions
diff --git a/pod/perlrun.pod b/pod/perlrun.pod index f3b8c860d9..0683ef128d 100644 --- a/pod/perlrun.pod +++ b/pod/perlrun.pod @@ -5,7 +5,7 @@ perlrun - how to execute the Perl interpreter =head1 SYNOPSIS B<perl> S<[ B<-sTtuUWX> ]> - S<[ B<-hv> ] [ B<-V>[:I<configvar>] ]> + S<[ B<-h?v> ] [ B<-V>[:I<configvar>] ]> S<[ B<-cw> ] [ B<-d>[B<t>][:I<debugger>] ] [ B<-D>[I<number/list>] ]> S<[ B<-pna> ] [ B<-F>I<pattern> ] [ B<-l>[I<octal>] ] [ B<-0>[I<octal/hexadecimal>] ]> S<[ B<-I>I<dir> ] [ B<-m>[B<->]I<module> ] [ B<-M>[B<->]I<'module...'> ] [ B<-f> ]> @@ -516,6 +516,11 @@ X<-h> prints a summary of the options. +=item B<-?> +X<-?> + +synonym for B<-h>: prints a summary of the options. + =item B<-i>[I<extension>] X<-i> X<in-place> diff --git a/t/run/switches.t b/t/run/switches.t index 6546fc6ff0..496f2f41af 100644 --- a/t/run/switches.t +++ b/t/run/switches.t @@ -12,7 +12,7 @@ BEGIN { BEGIN { require "./test.pl"; require "./loc_tools.pl"; } -plan(tests => 135); +plan(tests => 136); use Config; @@ -309,7 +309,7 @@ is runperl(stderr => 1, prog => '#!perl -M'), } } -# Tests for -h +# Tests for -h and -? { local $TODO = ''; # these ones should work on VMS @@ -318,6 +318,10 @@ is runperl(stderr => 1, prog => '#!perl -M'), qr/Usage: .+(?i:perl(?:$Config{_exe})?).+switches.+programfile.+arguments/, '-h looks okay' ); + like( runperl( switches => ['-?'] ), + qr/Usage: .+(?i:perl(?:$Config{_exe})?).+switches.+programfile.+arguments/, + '-? looks okay' ); + } # Tests for switches which do not exist |