You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by he...@apache.org on 2022/04/21 04:17:48 UTC
svn commit: r1900093 - in /spamassassin/branches/trunk-welcomelist: MANIFEST t/wlbl_uri.t
Author: hege
Date: Thu Apr 21 04:17:48 2022
New Revision: 1900093
URL: http://svn.apache.org/viewvc?rev=1900093&view=rev
Log:
Improve wlbl_uri.t
Modified:
spamassassin/branches/trunk-welcomelist/MANIFEST
spamassassin/branches/trunk-welcomelist/t/wlbl_uri.t
Modified: spamassassin/branches/trunk-welcomelist/MANIFEST
URL: http://svn.apache.org/viewvc/spamassassin/branches/trunk-welcomelist/MANIFEST?rev=1900093&r1=1900092&r2=1900093&view=diff
==============================================================================
--- spamassassin/branches/trunk-welcomelist/MANIFEST (original)
+++ spamassassin/branches/trunk-welcomelist/MANIFEST Thu Apr 21 04:17:48 2022
@@ -656,6 +656,7 @@ t/welcomelist_addrs.t
t/welcomelist_from.t
t/welcomelist_subject.t
t/welcomelist_to.t
+t/wlbl_uri.t
t/whitelist_addrs.t
t/whitelist_from.t
t/whitelist_subject.t
Modified: spamassassin/branches/trunk-welcomelist/t/wlbl_uri.t
URL: http://svn.apache.org/viewvc/spamassassin/branches/trunk-welcomelist/t/wlbl_uri.t?rev=1900093&r1=1900092&r2=1900093&view=diff
==============================================================================
--- spamassassin/branches/trunk-welcomelist/t/wlbl_uri.t (original)
+++ spamassassin/branches/trunk-welcomelist/t/wlbl_uri.t Thu Apr 21 04:17:48 2022
@@ -2,22 +2,54 @@
use lib '.'; use lib 't';
use SATest; sa_t_init("wlbl_uri");
-use Test::More tests => 4;
+use Test::More tests => 12;
%patterns = (
- q{ URI_HOST_IN_BLOCKLIST }, 'hit-blo',
+ q{ 0.0 URI_HOST_IN_BLOCKLIST }, 'hit-blo',
+ q{ 100 URI_HOST_IN_BLACKLIST }, 'hit-bla',
+ q{ -0.0 URI_HOST_IN_WELCOMELIST }, 'hit-wel',
+ q{ -100 URI_HOST_IN_WHITELIST }, 'hit-whi',
+);
+
+###
+
+tstprefs("
+ blocklist_uri_host ximian.com
+ welcomelist_uri_host helixcode.com
+");
+
+sarun ("-L -t < data/nice/001", \&patterns_run_cb);
+ok_all_patterns();
+
+###
+
+tstprefs("
+ blacklist_uri_host ximian.com
+ whitelist_uri_host helixcode.com
+");
+
+sarun ("-L -t < data/nice/001", \&patterns_run_cb);
+ok_all_patterns();
+
+###
+
+%patterns = (
+ q{ 100 URI_HOST_IN_BLOCKLIST }, 'hit-blo',
+ q{ -100 URI_HOST_IN_WELCOMELIST }, 'hit-wel',
+);
+%anti_patterns = (
q{ URI_HOST_IN_BLACKLIST }, 'hit-bla',
- q{ URI_HOST_IN_WELCOMELIST }, 'hit-wel',
q{ URI_HOST_IN_WHITELIST }, 'hit-whi',
);
-tstprefs ("
- $default_cf_lines
- blocklist_uri_host ximian.com
- blacklist_uri_host ximian.com
- welcomelist_uri_host helixcode.com
- whitelist_uri_host helixcode.com
- ");
+tstpre("
+ enable_compat welcomelist_blocklist
+");
+tstprefs("
+ blocklist_uri_host ximian.com
+ welcomelist_uri_host helixcode.com
+");
sarun ("-L -t < data/nice/001", \&patterns_run_cb);
ok_all_patterns();
+