You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by mm...@apache.org on 2009/08/06 11:06:01 UTC
svn commit: r801547 - /spamassassin/trunk/t/missing_hb_separator.t
Author: mmartinec
Date: Thu Aug 6 09:06:00 2009
New Revision: 801547
URL: http://svn.apache.org/viewvc?rev=801547&view=rev
Log:
missing_hb_separator.t: avoid dependency on MISSING_SUBJECT rule
Modified:
spamassassin/trunk/t/missing_hb_separator.t
Modified: spamassassin/trunk/t/missing_hb_separator.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/missing_hb_separator.t?rev=801547&r1=801546&r2=801547&view=diff
==============================================================================
--- spamassassin/trunk/t/missing_hb_separator.t (original)
+++ spamassassin/trunk/t/missing_hb_separator.t Thu Aug 6 09:06:00 2009
@@ -20,7 +20,7 @@
use SATest; sa_t_init("missing_hb_separator");
use Mail::SpamAssassin;
-plan tests => 15;
+plan tests => 13;
# initialize SpamAssassin
my $sa = create_saobj({'dont_copy_prefs' => 1});
@@ -92,25 +92,7 @@
#####
-@msg = ("X-Message-Info: foo\n", "--This is a test\n");
-$mail = $sa->parse(\@msg, 1);
-$status = $sa->check($mail);
-
-$result = 0;
-foreach (@{$status->{test_names_hit}}) {
- $result++ if ($_ eq 'MISSING_HB_SEP' || $_ eq 'X_MESSAGE_INFO');
-}
-
-ok ( $result == 2 );
-ok ( $mail->{pristine_body} eq "--This is a test\n" );
-
-$status->finish();
-$mail->finish();
-
-
-#####
-
-@msg = ("X-Message-Info:foo\n", "one\n", "ywo\n", "yhree\n", "Subject:x\n",
+@msg = ("Subject:x\n", "one\n", "two\n", "three\n", "X-Message-Info:foo\n",
"\n", "test body\n");
$mail = $sa->parse(\@msg, 1);
$status = $sa->check($mail);
@@ -118,8 +100,7 @@
$result = 0;
foreach (@{$status->{test_names_hit}}) {
# print "test hit: $_\n";
- $result++ if ($_ eq 'MISSING_HB_SEP' || $_ eq 'X_MESSAGE_INFO' ||
- $_ eq 'MISSING_SUBJECT');
+ $result++ if ($_ eq 'MISSING_HB_SEP' || $_ eq 'X_MESSAGE_INFO');
}
ok ( $result == 1 );
@@ -131,19 +112,18 @@
#####
-@msg = ("X-Message-Info:foo\n", "one\n", "ywo\n", "yhree\n", "four\n",
- "Subject:x\n", "\n", "test\n");
+@msg = ("Subject:x\n", "one\n", "two\n", "three\n", "four\n",
+ "X-Message-Info:foo\n", "\n", "test\n");
$mail = $sa->parse(\@msg, 1);
$status = $sa->check($mail);
$result = 0;
foreach (@{$status->{test_names_hit}}) {
# print "test hitH: $_\n";
- $result++ if ($_ eq 'MISSING_HB_SEP' || $_ eq 'X_MESSAGE_INFO' ||
- $_ eq 'MISSING_SUBJECT');
+ $result++ if ($_ eq 'MISSING_HB_SEP' || $_ eq 'X_MESSAGE_INFO');
}
-ok ( $result == 3 );
+ok ( $result == 1 );
$status->finish();
$mail->finish();