X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fop%2Fwrite.t;h=9224d2f9363c29a23ec46306969ebbc4901b6666;hb=b3a3b3a1da8f5142edf3e194532b08316f895282;hp=6e37cac538731659a82cf0840850950c43b14fa4;hpb=a1b950687051c32e26de8681b0ed639ad32adfb4;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/op/write.t b/t/op/write.t index 6e37cac..9224d2f 100755 --- a/t/op/write.t +++ b/t/op/write.t @@ -531,23 +531,27 @@ ok @<<<<< $test . -$= = 10; # [ID 20020227.005] format bug with undefined _TOP + +open STDOUT_DUP, ">&STDOUT"; +my $oldfh = select STDOUT_DUP; +$= = 10; { local $~ = "Comment"; write; $test++; print $- == 9 ? "ok $test # TODO\n" : "not ok $test # TODO \$- = $- instead of 9\n"; $test++; - print $^ ne "Comment_TOP" - ? "ok $test\n" : "not ok $test # TODO \$^ = $^ instead of 'STDOUT_TOP'\n"; + print $^ eq "STDOUT_DUP_TOP" + ? "ok $test\n" : "not ok $test\n# \$^ = $^ instead of 'STDOUT_DUP_TOP'\n"; $test++; - } +} +select $oldfh; - $^ = "STDOUT_TOP"; - $= = 7; # Page length - $- = 0; # Lines left +$^ = "STDOUT_TOP"; +$= = 7; # Page length +$- = 0; # Lines left my $ps = $^L; $^L = ""; # Catch the page separator my $tm = 1; # Top margin (empty lines before first output) my $bm = 2; # Bottom marging (empty lines between last text and footer)