diff options
author | Father Chrysostomos <sprout@cpan.org> | 2010-09-26 17:36:51 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-09-26 17:36:51 -0700 |
commit | d4a59e542ce03bfe18bcffde552ee3abd4322b89 (patch) | |
tree | 06e05e161859a626c2f5c47b46a4a7c0134bdc36 /t | |
parent | e2941eb00290cb2fcd0e0ca3f614f82202be65f7 (diff) | |
download | perl-d4a59e542ce03bfe18bcffde552ee3abd4322b89.tar.gz |
#!perl -C -w dies
parse_unicode_opts expects to end on '\0'. So #!perl -C -w causes an
‘Unknown Unicode option letter ' '’ error. The attached
patch fixes it.
Diffstat (limited to 't')
-rw-r--r-- | t/run/switchC.t | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/t/run/switchC.t b/t/run/switchC.t index 213bdbc3c9..65b5eab17a 100644 --- a/t/run/switchC.t +++ b/t/run/switchC.t @@ -18,7 +18,7 @@ BEGIN { BEGIN { require "./test.pl"; } -plan(tests => 9); +plan(tests => 11); my $r; @@ -69,6 +69,19 @@ $r = runperl( switches => [ '-CS', '-w' ], stderr => 1, ); like( $r, qr/^$b(?:\r?\n)?$/s, '#!perl -C' ); +$r = runperl( switches => [ '-CS' ], + progs => [ '#!perl -CS -w', 'print chr(256), !!$^W'], + stderr => 1, ); +like( $r, qr/^${b}1(?:\r?\n)?$/s, '#!perl -C followed by another switch' ); + +$r = runperl( switches => [ '-CS' ], + progs => [ '#!perl -C7 -w', 'print chr(256), !!$^W'], + stderr => 1, ); +like( + $r, qr/^${b}1(?:\r?\n)?$/s, + '#!perl -C<num> followed by another switch' +); + $r = runperl( switches => [ '-CA', '-w' ], progs => [ '#!perl -CS', 'print chr(256)' ], stderr => 1, ); |