File: many-repeats.t

package info (click to toggle)
libemail-simple-perl 2.004-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 232 kB
  • ctags: 27
  • sloc: perl: 615; makefile: 41
file content (16 lines) | stat: -rw-r--r-- 551 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/perl -w
use strict;
use Test::More tests => 4;

sub read_file { local $/; local *FH; open FH, shift or die $!; return <FH> }
use_ok("Email::Simple");
# Very basic functionality test
my $mail_text = read_file("t/test-mails/many-repeats");
my $mail = Email::Simple->new($mail_text);
isa_ok($mail, "Email::Simple");

my $body = $mail->body;

$mail->body_set($body);
is($mail->as_string, $mail_text, "Good grief, it's round-trippable");
is(Email::Simple->new($mail->as_string)->as_string, $mail_text, "Good grief, it's still round-trippable");