summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2015-11-26 11:18:52 +1100
committerTony Cook <tony@develop-help.com>2015-12-07 13:48:08 +1100
commit817e3e2c67db64af99b44c781b75ef9f01fc619a (patch)
treebb6f4ca6cbd96c78d4dfb3ba9067d2858a861c28 /t
parent4bb6c75a4739d76a16dc0dc46dc4f7ad8c8a0b73 (diff)
downloadperl-817e3e2c67db64af99b44c781b75ef9f01fc619a.tar.gz
[perl #123991] report an error if we can't parse the number after -C
Diffstat (limited to 't')
-rw-r--r--t/run/switchC.t8
1 files changed, 7 insertions, 1 deletions
diff --git a/t/run/switchC.t b/t/run/switchC.t
index 4f63c3b141..6583010551 100644
--- a/t/run/switchC.t
+++ b/t/run/switchC.t
@@ -11,7 +11,7 @@ BEGIN {
skip_all_if_miniperl('-C and $ENV{PERL_UNICODE} are disabled on miniperl');
}
-plan(tests => 14);
+plan(tests => 15);
my $r;
@@ -111,3 +111,9 @@ SKIP: {
like( $r, qr/^Too late for "-CS" option at -e line 1\.$/s,
'#!perl -C but not command line' );
}
+
+$r = runperl ( switches => [ '-C00' ],
+ prog => '1',
+ stderr => 1, );
+like($r, qr/^Invalid number '00' for -C option\.$/s,
+ "perl -C00 [perl #123991]");