summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.org>2002-11-04 15:16:34 +0000
committerhv <hv@crypt.org>2002-11-04 15:16:34 +0000
commitf4126beca049b2be5f2468b43c3ba2b4b0da6725 (patch)
tree40c2cf3998a973ca11ebbf31787fb22415ef48e6 /t
parent1d86a7f9aafa7b00ab187ace80f468664c66c924 (diff)
parentbf02d38ec7892c236ea4b293274ea6a3c334a25d (diff)
downloadperl-f4126beca049b2be5f2468b43c3ba2b4b0da6725.tar.gz
integrate from perlio: changes #17709, #17795, #17796, #18032
p4raw-link: @17709 on //depot/perlio: e949e37c57a7b8894b837a34a436233508daf2e1 p4raw-id: //depot/perl@18086
Diffstat (limited to 't')
-rw-r--r--t/io/crlf.t14
1 files changed, 13 insertions, 1 deletions
diff --git a/t/io/crlf.t b/t/io/crlf.t
index 08ab4fe3b0..484596bd47 100644
--- a/t/io/crlf.t
+++ b/t/io/crlf.t
@@ -15,7 +15,7 @@ END {
}
if (find PerlIO::Layer 'perlio') {
- plan(tests => 7);
+ plan(tests => 8);
ok(open(FOO,">:crlf",$file));
ok(print FOO 'a'.((('a' x 14).qq{\n}) x 2000) || close(FOO));
ok(open(FOO,"<:crlf",$file));
@@ -30,6 +30,18 @@ if (find PerlIO::Layer 'perlio') {
{ local $/; $text = <FOO> }
is(count_chars($text, "\015\012"), 2000);
+ {
+ my $fcontents = join "", map {"$_\r\n"} "a".."zzz";
+ open my $fh, "<:crlf", \$fcontents;
+ local $/ = "xxx";
+ local $_ = <$fh>;
+ my $pos = tell $fh; # pos must be behind "xxx", before "\nyyy\n"
+ seek $fh, $pos, 0;
+ $/ = "\n";
+ $s = <$fh>.<$fh>;
+ ok($s eq "\nxxy\n");
+ }
+
ok(close(FOO));
}
else {