diff options
author | Tony Cook <tony@develop-help.com> | 2015-02-04 16:10:20 +1100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2015-02-04 16:10:20 +1100 |
commit | 5fe499a8e26270679c0c6d48431f3a328a8ffeba (patch) | |
tree | b51d44f06c32905f03038782f4f36089d33c43cd /t/base | |
parent | 84ad9c6c2d2072cd602e0f4ee76fd4ac5107dc3d (diff) | |
download | perl-5fe499a8e26270679c0c6d48431f3a328a8ffeba.tar.gz |
[perl #123218] "preserve" $/ if set to a bad value
and base/rs.t tests $/ not $!
Diffstat (limited to 't/base')
-rw-r--r-- | t/base/rs.t | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/t/base/rs.t b/t/base/rs.t index c81b2dcaf5..6f3c4b5abe 100644 --- a/t/base/rs.t +++ b/t/base/rs.t @@ -1,7 +1,7 @@ #!./perl -# Test $! +# Test $/ -print "1..38\n"; +print "1..39\n"; $test_count = 1; $teststring = "1\n12\n123\n1234\n1234\n12345\n\n123456\n1234567\n"; @@ -34,8 +34,13 @@ test_record(*TESTFILE); close TESTFILE; $test_count_end = $test_count; # Needed to know how many tests to skip +$/ = "\n"; +my $note = "\$/ preserved when set to bad value"; +# none of the setting of $/ to bad values should modify its value test_bad_setting(); - +print +($/ ne "\n" ? "not " : "") . + "ok $test_count # \$/ preserved when set to bad value\n"; +++$test_count; # Now for the tricky bit--full record reading if ($^O eq 'VMS') { |