summaryrefslogtreecommitdiff
path: root/ext/PerlIO/t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-08-05 16:10:59 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-08-05 16:10:59 +0000
commit2b8740d823413f94180ffcaa10364510759dbab1 (patch)
treefd62735ace66b9ae32f15335fcb97b0033951bcd /ext/PerlIO/t
parent108967c2780c6a80477cd84ad2874a41e5d02472 (diff)
downloadperl-2b8740d823413f94180ffcaa10364510759dbab1.tar.gz
Add a test for PerlIO::Via.
p4raw-id: //depot/perl@11582
Diffstat (limited to 'ext/PerlIO/t')
-rw-r--r--ext/PerlIO/t/via.t33
1 files changed, 33 insertions, 0 deletions
diff --git a/ext/PerlIO/t/via.t b/ext/PerlIO/t/via.t
new file mode 100644
index 0000000000..a2201e08c6
--- /dev/null
+++ b/ext/PerlIO/t/via.t
@@ -0,0 +1,33 @@
+#!./perl
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+ unless (find PerlIO::Layer 'perlio') {
+ print "1..0 # Skip: not perlio\n";
+ exit 0;
+ }
+}
+
+my $tmp = "via$$";
+
+print "1..3\n";
+
+$a = join("", map { chr } 0..255) x 10;
+
+use MIME::QuotedPrint;
+open(my $fh,">Via(MIME::QuotedPrint)", $tmp);
+print $fh $a;
+close($fh);
+print "ok 1\n";
+
+open(my $fh,"<Via(MIME::QuotedPrint)", $tmp);
+{ local $/; $b = <$fh> }
+close($fh);
+print "ok 2\n";
+
+print "ok 3\n" if $a eq $b;
+
+END {
+ 1 while unlink $tmp;
+}