[prev] [thread] [next] [lurker] [Date index for 2005/02/25]
Author: simon Date: 2005-02-25 10:18:43 +0000 (Fri, 25 Feb 2005) New Revision: 1952 Added: trunk/Email-Store-HTML/t/02inline.t trunk/Email-Store-HTML/t/inlinehtmltest.mail Modified: trunk/Email-Store-HTML/t/01basic.t Log: Make tetss for inline html Modified: trunk/Email-Store-HTML/t/01basic.t =================================================================== --- trunk/Email-Store-HTML/t/01basic.t 2005-02-25 10:17:23 UTC (rev 1951) +++ trunk/Email-Store-HTML/t/01basic.t 2005-02-25 10:18:43 UTC (rev 1952) @@ -1,7 +1,7 @@ use Test::More tests => 14; use File::Slurp; BEGIN { unlink("t/test.db"); } -use Email::Store "dbi:SQLite:dbname=t/test.db"; +use Email::Store "dbi:SQLite2:dbname=t/test.db"; Email::Store->setup( ); ok(1, "Set up"); Added: trunk/Email-Store-HTML/t/02inline.t =================================================================== --- trunk/Email-Store-HTML/t/02inline.t 2005-02-25 10:17:23 UTC (rev 1951) +++ trunk/Email-Store-HTML/t/02inline.t 2005-02-25 10:18:43 UTC (rev 1952) @@ -0,0 +1,29 @@ +use Test::More tests => 11; +use File::Slurp; +BEGIN { unlink("t/test.db"); } +use Email::Store "dbi:SQLite2:dbname=t/test.db"; +Email::Store->setup( ); +ok(1, "Set up"); + +my $data = read_file("t/inlinehtmltest.mail"); +Email::Store::Mail->store($data); +my ($m) = Email::Store::Mail->retrieve_all(); #('myfakeid@localhost'); +ok($m, "Got the mail back"); + + + +my (@html, $html, $body, $raw, $scrubbed, $as_text); +ok(@html = $m->html, "Got html"); +is(@html, 1, "Only one part"); + +$html = shift @html; + +ok($body = $m->simple->body, "Got body"); +ok($raw = $html->raw, "Got raw"); +ok($scrubbed = $html->scrubbed, "Got scrubbed"); +ok($as_text = $html->as_text, "Got text"); + +unlike($body, qr/</, "No html in body"); +unlike($body, qr/^\s*$/s, "Not blank"); +like($raw, qr/</, "Got html in raw"); + Added: trunk/Email-Store-HTML/t/inlinehtmltest.mail =================================================================== --- trunk/Email-Store-HTML/t/inlinehtmltest.mail 2005-02-25 10:17:23 UTC (rev 1951) +++ trunk/Email-Store-HTML/t/inlinehtmltest.mail 2005-02-25 10:18:43 UTC (rev 1952) @@ -0,0 +1,92 @@ +From error2@xxxxxxx.xxxxxxxxxx.xxx.xx Tue Feb 1 17:26:36 2005 +Return-Path: <error2@xxxxxxx.xxxxxxxxxx.xxx.xx> +X-Original-To: clkao@xxxxx.xxx +Delivered-To: clkao@xxxxx.xxx +Received: from ebmail1.chinatrust.com.tw (ebmail1.chinatrust.com.tw [203.66.181.222]) + by home.clkao.org (Postfix) with ESMTP id 6599C2F3 + for <clkao@xxxxx.xxx>; Tue, 1 Feb 2005 17:26:36 +0800 (CST) +Received: from nbsvrp11 (ebmail1.chinatrust.com.tw [203.66.181.222]) + by ebmail1.chinatrust.com.tw (Postfix) with ESMTP id E44757AB0 + for <clkao@xxxxx.xxx>; Tue, 1 Feb 2005 17:27:14 +0800 (CST) +Message-ID: 64794$$$36291702$$$clkao@xxxxx.xxx +From: =?BIG5?B?pKSw6qtIsFWw07d+u8im5g==?= <bank.csc@xxxxxx.xxxxxxxxxx.xxx.xx> +Reply-To: bank.csc@xxxxxx.xxxxxxxxxx.xxx.xx +To: clkao@xxxxx.xxx +Subject: =?BIG5?B?pKSw6qtIsFVWSVNBxefD0qpBsMgtLaTRpNGwZTUwMDCkuCE=?= +Mime-Version: 1.0 +Content-Type: text/html; charset=BIG5 +Content-Transfer-Encoding: base64 +Date: Tue, 1 Feb 2005 17:27:14 +0800 (CST) +X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on home.clkao.org +X-Spam-Level: **** +X-Spam-Status: No, score=4.3 required=5.0 tests=AWL,BAYES_99,HTML_90_100, + HTML_IMAGE_RATIO_02,HTML_MESSAGE,HTML_TAG_EXIST_TBODY, + HTML_TEXT_AFTER_BODY,HTML_TEXT_AFTER_HTML,INVALID_MSGID,IP_LINK_PLUS, + MIME_BASE64_TEXT,MIME_HTML_ON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