diff options
-rw-r--r-- | MANIFEST | 1 | ||||
-rw-r--r-- | perl.c | 2 | ||||
-rw-r--r-- | t/run/switch0.t | 3 |
3 files changed, 5 insertions, 1 deletions
@@ -2891,6 +2891,7 @@ t/run/exit.t Test perl's exit status. t/run/fresh_perl.t Tests that require a fresh perl. t/run/noswitch.t Test aliasing ARGV for other switch tests t/run/runenv.t Test if perl honors its environment variables. +t/run/switch0.t Test the -0 switch t/run/switcha.t Test the -a switch t/run/switch_A.t Test the -A switch t/run/switchC.t Test the -C switch @@ -1358,7 +1358,6 @@ print \" \\@INC:\\n @INC\\n\";"); } } switch_end: - sv_setsv(get_sv("/", TRUE), PL_rs); if ( #ifndef SECURE_INTERNAL_GETENV @@ -2389,6 +2388,7 @@ Perl_moreswitches(pTHX_ char *s) PL_rs = newSVpvn(&ch, 1); } } + sv_setsv(get_sv("/", TRUE), PL_rs); return s + numlen; } case 'C': diff --git a/t/run/switch0.t b/t/run/switch0.t new file mode 100644 index 0000000000..9919e1231a --- /dev/null +++ b/t/run/switch0.t @@ -0,0 +1,3 @@ +#!./perl -0 +print "1..1\n"; +print ord $/ == 0 ? "ok 1\n" : "not ok 1\n"; |