spamassassin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j.@apache.org
Subject svn commit: rev 10299 - in incubator/spamassassin/trunk: . t
Date Tue, 27 Apr 2004 01:47:24 GMT
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();
+

Mime
View raw message