diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2002-10-12 20:22:37 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2002-10-12 20:22:37 +0000 |
commit | 7f9e821f0be8f0d2dc7f73eee7bbcade8739c838 (patch) | |
tree | 6f83ca0733ec26484182a714bdb87800e3906739 /t/run/switches.t | |
parent | a5c16299e4688e58a2a7b276af191a614da68f07 (diff) | |
download | perl-7f9e821f0be8f0d2dc7f73eee7bbcade8739c838.tar.gz |
The -0 command-line switch wasn't setting $/ at compile-time.
Move the initialization of $/ just after switch parsing
(it was done after yyparse().)
p4raw-id: //depot/perl@18015
Diffstat (limited to 't/run/switches.t')
-rw-r--r-- | t/run/switches.t | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/t/run/switches.t b/t/run/switches.t index 996ad5d4c6..9bcbc80a9e 100644 --- a/t/run/switches.t +++ b/t/run/switches.t @@ -9,7 +9,7 @@ BEGIN { require "./test.pl"; -plan(tests => 19); +plan(tests => 20); # due to a bug in VMS's piping which makes it impossible for runperl() # to emulate echo -n (ie. stdin always winds up with a newline), these @@ -64,6 +64,12 @@ $r = runperl( ); is( $r, 'abc-def--ghi-jkl-mno--pq-/', '-0777 (slurp mode)' ); +$r = runperl( + switches => [ '-066' ], + prog => 'BEGIN { print "($/)" } print "[$/]"', +); +is( $r, "(\066)[\066]", '$/ set at compile-time' ); + # Tests for -c my $filename = 'swctest.tmp'; |