Supporess spurious warnings for @+ and and @-
[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  my $cr = "\r";
24  while (<FOO>)
25   {
26    $seen += tr/[\015]//;
27   }
28  is($seen,0);
29  binmode(FOO);
30  seek(FOO,0,0);
31  $seen = 0;
32  while (<FOO>)
33   {
34    $seen += tr/[\015]//;
35   }
36  is($seen,2000);
37  ok(close(FOO));
38 }
39 else {
40  skip_all("No perlio, so no :crlf");
41 }
42
43