You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2004/04/27 03:47:24 UTC
svn commit: rev 10299 - in incubator/spamassassin/trunk: . t
Author: jm
Date: Mon Apr 26 18:47:24 2004
New Revision: 10299
Added:
incubator/spamassassin/trunk/t/spamd_syslog.t (contents, props changed)
Modified:
incubator/spamassassin/trunk/MANIFEST
incubator/spamassassin/trunk/t/SATest.pm
Log:
bug 2198: spamd tests now do not log to syslog at all, except for one new one -- spamd_syslog.t
Modified: incubator/spamassassin/trunk/MANIFEST
==============================================================================
--- incubator/spamassassin/trunk/MANIFEST (original)
+++ incubator/spamassassin/trunk/MANIFEST Mon Apr 26 18:47:24 2004
@@ -339,3 +339,4 @@
t/rule_names.t
rules/25_body_tests_es.cf
build/update_website_docs
+t/spamd_syslog.t
Modified: incubator/spamassassin/trunk/t/SATest.pm
==============================================================================
--- incubator/spamassassin/trunk/t/SATest.pm (original)
+++ incubator/spamassassin/trunk/t/SATest.pm Mon Apr 26 18:47:24 2004
@@ -298,9 +298,15 @@
my @spamd_args = (
$spamd,
qq{-D},
+ qq{-x}
+ );
+
+ if (!$spamd_inhibit_log_to_err) {
+ push (@spamd_args,
qq{-s}, qq{stderr},
- qq{-x},
);
+ }
+
if ($spamd_extra_args !~ /(?:-C\s*[^-]\S+)/) {
push(@spamd_args,
$spamd_cf_args,
Added: incubator/spamassassin/trunk/t/spamd_syslog.t
==============================================================================
--- (empty file)
+++ incubator/spamassassin/trunk/t/spamd_syslog.t Mon Apr 26 18:47:24 2004
@@ -0,0 +1,26 @@
+#!/usr/bin/perl
+
+use lib '.'; use lib 't';
+use SATest; sa_t_init("spamd_syslog");
+use Test; BEGIN { plan tests => ($SKIP_SPAMD_TESTS ? 0 : 7) };
+
+exit if $SKIP_SPAMD_TESTS;
+
+# ---------------------------------------------------------------------------
+
+%patterns = (
+
+q{ Subject: There yours for FREE!}, 'subj',
+q{ X-Spam-Status: Yes, score=}, 'status',
+q{ X-Spam-Flag: YES}, 'flag',
+q{ X-Spam-Level: **********}, 'stars',
+q{ FROM_ENDS_IN_NUMS}, 'endsinnums',
+q{ NO_REAL_NAME}, 'noreal',
+
+
+);
+
+$spamd_inhibit_log_to_err = 1;
+ok (sdrun ("-L", "< data/spam/001", \&patterns_run_cb));
+ok_all_patterns();
+