projects
/
p5sagit/p5-mst-13.2.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
t/io/fs.t - skip all tests that fail on VOS
[p5sagit/p5-mst-13.2.git]
/
t
/
io
/
crlf.t
1
#!./perl -w
2
3
BEGIN {
4
chdir 't' if -d 't';
5
@INC = qw(. ../lib);
6
}
7
8
use Config;
9
10
require "test.pl";
11
12
my $file = "crlf$$.dat";
13
END {
14
unlink($file);
15
}
16
17
if ($Config{useperlio}) {
18
plan(tests => 6);
19
ok(open(FOO,">:crlf",$file));
20
ok(print FOO 'a'.((('a' x 14).qq{\n}) x 2000) || close(FOO));
21
ok(open(FOO,"<:crlf",$file));
22
my $seen = 0;
23
while (<FOO>)
24
{
25
$seen++ if (/\r/);
26
}
27
is($seen,0);
28
binmode(FOO);
29
seek(FOO,0,0);
30
$seen = 0;
31
while (<FOO>)
32
{
33
$seen++ if (/\r/);
34
}
35
is($seen,2000);
36
ok(close(FOO));
37
}
38
else {
39
skip_all("No perlio, so no :crlf");
40
}
41
42