This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
a2201e08c6ee629d6fde0113e00dc901bce5f75d
[perl5.git] / ext / PerlIO / t / via.t
1 #!./perl
2
3 BEGIN {
4     chdir 't' if -d 't';
5     @INC = '../lib';
6     unless (find PerlIO::Layer 'perlio') {
7         print "1..0 # Skip: not perlio\n";
8         exit 0;
9     }
10 }
11
12 my $tmp = "via$$";
13
14 print "1..3\n";
15
16 $a = join("", map { chr } 0..255) x 10;
17
18 use MIME::QuotedPrint;
19 open(my $fh,">Via(MIME::QuotedPrint)", $tmp);
20 print $fh $a;
21 close($fh);
22 print "ok 1\n";
23
24 open(my $fh,"<Via(MIME::QuotedPrint)", $tmp);
25 { local $/; $b = <$fh> }
26 close($fh);
27 print "ok 2\n";
28
29 print "ok 3\n" if $a eq $b;
30
31 END {
32     1 while unlink $tmp;
33 }