diff options
Diffstat (limited to 't/run')
-rw-r--r-- | t/run/switches.t | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/t/run/switches.t b/t/run/switches.t index f636cea43e..419d580d4d 100644 --- a/t/run/switches.t +++ b/t/run/switches.t @@ -11,7 +11,7 @@ BEGIN { BEGIN { require "./test.pl"; } -plan(tests => 71); +plan(tests => 110); use Config; @@ -297,6 +297,20 @@ foreach my $switch (split //, "ABbGgHJjKkLNOoPQqRrYyZz123456789_") qr/\QUnrecognized switch: -$switch (-h will show valid options)./, "-$switch correctly unknown" ); + # [perl #104288] + like( runperl( stderr => 1, prog => "#!perl -$switch" ), + qr/^Unrecognized switch: -$switch \(-h will show valid (?x: + )options\) at -e line 1\./, + "-$switch unrecognised on #! line" ); +} + +# Tests for unshebangable switches +for (qw( e f x E S V )) { + $r = runperl( + stderr => 1, + prog => "#!perl -$_", + ); + is $r, "Can't emulate -$_ on #! line at -e line 1.\n","-$_ on #! line"; } # Tests for -i |