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/06/16 00:24:25 UTC

svn commit: rev 21320 - in incubator/spamassassin/trunk: . t t/data/nice

Author: jm
Date: Tue Jun 15 15:24:25 2004
New Revision: 21320

Added:
   incubator/spamassassin/trunk/t/data/nice/016
Modified:
   incubator/spamassassin/trunk/MANIFEST
   incubator/spamassassin/trunk/t/hashcash.t
Log:
test update: ensure 2 hashcash tokens in multiple headers work sensibly

Modified: incubator/spamassassin/trunk/MANIFEST
==============================================================================
--- incubator/spamassassin/trunk/MANIFEST	(original)
+++ incubator/spamassassin/trunk/MANIFEST	Tue Jun 15 15:24:25 2004
@@ -353,3 +353,4 @@
 rules/30_text_nl.cf
 spamd/README.SuSE
 spamd/suse-ancient-rc-script.sh
+t/data/nice/016

Added: incubator/spamassassin/trunk/t/data/nice/016
==============================================================================
--- (empty file)
+++ incubator/spamassassin/trunk/t/data/nice/016	Tue Jun 15 15:24:25 2004
@@ -0,0 +1,19 @@
+From jm@dogma.slashnull.org  Wed May 16 00:40:34 2001
+Return-Path: <jm...@dogma.slashnull.org>
+Received: from dogma.slashnull.org (dogma.slashnull.org [212.17.35.15]) by
+    mail.netnoteinc.com (Postfix) with ESMTP id 830E5115158 for
+    <jm...@netnoteinc.com>; Tue, 15 May 2001 23:40:33 +0000 (Eire)
+Received: (from jm@localhost) by dogma.slashnull.org (8.9.3/8.9.3) id
+    AAA30873 for jm@netnoteinc.com; Wed, 16 May 2001 00:40:33 +0100
+Received: from trna.ximian.com ([141.154.95.22]) by dogma.slashnull.org
+    (8.9.3/8.9.3) with ESMTP id AAA30867 for <jm...@jmason.org>;
+    Wed, 16 May 2001 00:40:31 +0100
+From: "Ximian, Inc." <ev...@ximian.com>
+To: announce@ximian.com
+Date: 15 May 2001 17:31:22 -0400
+Message-Id: <98...@milkplus>
+Subject: [HC Announce] Ximian Evolution 0.10 "Tasmanian Devil" is Now Available!
+X-Hashcash: 0:040315:test@example.com:69781c87bae95c03
+X-Hashcash: 0:040615:test2@example.com:605f81ceef19eaa8
+
+[message body deleted]

Modified: incubator/spamassassin/trunk/t/hashcash.t
==============================================================================
--- incubator/spamassassin/trunk/t/hashcash.t	(original)
+++ incubator/spamassassin/trunk/t/hashcash.t	Tue Jun 15 15:24:25 2004
@@ -6,7 +6,7 @@
 # we need DB_File to support the double-spend db.
 use constant HAS_DB_FILE => eval { require DB_File; };
 
-use Test; BEGIN { plan tests => HAS_DB_FILE ? 2 : 0 };
+use Test; BEGIN { plan tests => HAS_DB_FILE ? 3 : 0 };
 
 exit unless HAS_DB_FILE;
 
@@ -17,7 +17,7 @@
 );
 
 tstprefs ('
-    hashcash_accept test@example.com
+    hashcash_accept test@example.com test2@example.com
     hashcash_doublespend_path log/user_state/hashcash_seen
     ');
 
@@ -30,3 +30,12 @@
 
 sarun ("-L -t < data/nice/001", \&patterns_run_cb);
 ok_all_patterns();
+
+# try again with a mail with 2 tokens, one unspent.
+%patterns = ();
+%anti_patterns = (
+q{ HASHCASH_2SPEND }, '2spend',
+);
+sarun ("-L -t < data/nice/016", \&patterns_run_cb);
+ok_all_patterns();
+