File: 6_autoload.t

package info (click to toggle)
libmail-mboxparser-perl 0.51-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 260 kB
  • ctags: 78
  • sloc: perl: 1,415; makefile: 51
file content (22 lines) | stat: -rwxr-xr-x 422 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /usr/bin/perl -w

use Test;
use File::Spec;
use strict;
use lib '..';
use Mail::MboxParser;

my $src = File::Spec->catfile('t', 'testbox');

BEGIN { plan tests => 5 };

my $mb  = Mail::MboxParser->new($src);
my @a   = $mb->get_messages;
my $msg = $a[8];
ok(defined $mb);
ok($msg->effective_type, 'multipart/mixed');
ok($msg->num_entities, 3);
ok($msg->parts_DFS, 2);
ok($msg->parts(1)->make_singlepart eq 'ALREADY');