Skip to content

Commit

Permalink
add Emlbest regression tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bigio committed Oct 4, 2024
1 parent 3c6c51d commit 488f806
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
9 changes: 9 additions & 0 deletions t/data/emlbest.eml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
From: test <[email protected]>
To: [email protected]
X-Complaints-To: [email protected]
X-EnvId: usproduction.b_1234567_332744566_37752340218_695174
X-Feedback-ID: 332744566:1234567:campaign:US
Date: Fri, 4 Oct 2024 04:08:22 +0000
Subject: test

Test
1 change: 1 addition & 0 deletions t/data/emlbest.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1234567
9 changes: 8 additions & 1 deletion t/esp.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use lib '.'; use lib 't';

use Test::More;
plan tests => 8;
plan tests => 9;

sub tstprefs {
my $rules = shift;
Expand All @@ -29,6 +29,10 @@ tstprefs("
header ECMESSENGER_ID eval:esp_ecmessenger_check()
describe ECMESSENGER_ID Check Ec-Messenger id
emlbest_feed t/data/emlbest.txt
header EMLBEST_ID eval:esp_emlbest_check()
describe EMLBEST_ID Check Emlbest id
mailchimp_feed t/data/mailchimp.txt
header MAILCHIMP_ID eval:esp_mailchimp_check()
describe MAILCHIMP_ID Check Mailchimp id
Expand Down Expand Up @@ -57,6 +61,9 @@ like($test, "/FORDEM_ID/");
my $test = qx($sarun -L -t --siteconfigpath=t/rules < t/data/ecmessenger.eml);
like($test, "/ECMESSENGER_ID/");

my $test = qx($sarun -L -t --siteconfigpath=t/rules < t/data/emlbest.eml);
like($test, "/EMLBEST_ID/");

$test = qx($sarun -L -t --siteconfigpath=t/rules < t/data/mailchimp.eml);
like($test, "/MAILCHIMP_ID/");

Expand Down

0 comments on commit 488f806

Please sign in to comment.