summaryrefslogtreecommitdiff
path: root/regress/message
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-04-07 12:47:01 +0000
committerfukachan <fukachan>2001-04-07 12:47:01 +0000
commit49fd1f5bc232f4b8df8fd6166557570af21fe97b (patch)
tree98c8f250922ef59b377e80c0933599ad190ca5ad /regress/message
parent1f866d1c230a25f47b0b316411b267edd8b8cec9 (diff)
downloadfml8-49fd1f5bc232f4b8df8fd6166557570af21fe97b.tar.gz
fml8-49fd1f5bc232f4b8df8fd6166557570af21fe97b.tar.bz2
fml8-49fd1f5bc232f4b8df8fd6166557570af21fe97b.zip
Initial revision
Diffstat (limited to 'regress/message')
-rwxr-xr-xregress/message/basic_io.pl30
1 files changed, 30 insertions, 0 deletions
diff --git a/regress/message/basic_io.pl b/regress/message/basic_io.pl
new file mode 100755
index 00000000..ee24cf89
--- /dev/null
+++ b/regress/message/basic_io.pl
@@ -0,0 +1,30 @@
+#!/usr/local/bin/perl
+#-*- perl -*-
+#
+# Copyright (C) 2001 Ken'ichi Fukamachi
+# All rights reserved. This program is free software; you can
+# redistribute it and/or modify it under the same terms as Perl itself.
+#
+# $FML: __template.pm,v 1.5 2001/04/03 09:45:39 fukachan Exp $
+#
+
+use strict;
+use Carp;
+use lib qw(../../cpan/lib);
+use Mail::Message;
+
+for my $f (@ARGV) {
+ my $tmp = "/tmp/buf$$";
+ my $fh = new FileHandle $f;
+ my $wh = new FileHandle "> $tmp";
+ my $obj = Mail::Message->parse( $fh );
+
+ $wh->autoflush(1);
+ $obj->print($wh);
+
+ print "-- $f ";
+ system "diff -ub $f $tmp";
+ print $@ ? "fail\n": "ok\n";
+}
+
+exit 0;