Ich habe es jetzt mal so gemacht:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl MIME-Lite-HT-HTML.t'
#########################
# change 'tests => 1' to 'tests => last_test_to_print';
use Test;
BEGIN { plan tests => 2 };
use MIME::Lite::HT::HTML;
ok(1); # If we made it this far, we're ok.
my $msg = MIME::Lite::HT::HTML->new(
From => 'from@example.com',
To => 'to@example.com',
Subject => 'Subject',
TimeZone => 'Europe/Berlin',
Encoding => 'quoted-printable',
Template => {
html => './t/data/mail.html',
text => './t/data/mail.txt',
},
Charset => 'utf8',
);
ok(1, 1, 'Could not instantiate MIME::Lite::HT::HTML without any options or params');
#########################
# Insert your test code below, the Test::More module is use()ed here so read
# its man page ( perldoc Test::More ) for help writing this test script.
Meinst Du, das ist so ok? Der Test läuft zumindest durch. Ich habe allerdings Bedenken wegen der relativen Pfadangabe:
./t/data/mail.html. Ist man bei der Modul-Installation denn immer im Verzeichnis des Moduls, wo alle Dateien entpackt werden?