|
[SACVS] CVS: spamassassin/t dns.t,NONE,1.1 razor2.t,1.12,1.13: msg#00101mail.spam.spamassassin.cvs
Update of /cvsroot/spamassassin/spamassassin/t In directory sc8-pr-cvs1:/tmp/cvs-serv19034/t Modified Files: razor2.t Added Files: dns.t Log Message: bug 2482: add DNSBL regression tests --- NEW FILE: dns.t --- #!/usr/bin/perl use lib '.'; use lib 't'; use SATest; sa_t_init("dns"); use constant TEST_ENABLED => (-e 't/do_net'); use constant HAS_NET_DNS => eval { require Net::DNS; }; use Test; BEGIN { plan tests => ((TEST_ENABLED && HAS_NET_DNS) ? 7 : 0), }; # --------------------------------------------------------------------------- %patterns = ( q{ <dns:15.35.17.212.blocked.secnap.net> [127.0.0.2] } => 'P_1', q{ <dns:226.149.120.193.blocked.secnap.net> [127.0.0.2] } => 'P_2', q{ <dns:18.13.119.61.blocked.secnap.net> [127.0.0.2] } => 'P_3', q{ <dns:134.88.73.210.blocked.secnap.net> [127.0.0.2] } => 'P_4', q{ <dns:98.3.137.144.blocked.secnap.net> [127.0.0.2] } => 'P_5', q{ RCVD_IN_BLOCKED } => 'P_6', ); %anti_patterns = ( q{ <dns:127.0.0.1.blocked.secnap.net> [127.0.0.2] } => 'A_1', ); tstprefs (" header RCVD_IN_BLOCKED eval:check_rbl('blocked', 'blocked.secnap.net.') describe RCVD_IN_BLOCKED BLOCKED: sender is any address tflags RCVD_IN_BLOCKED net add_header all RBL _RBL_ "); sarun ("-t < data/spam/004", \&patterns_run_cb); ok_all_patterns(); Index: razor2.t =================================================================== RCS file: /cvsroot/spamassassin/spamassassin/t/razor2.t,v retrieving revision 1.12 retrieving revision 1.13 diff -b -w -u -d -r1.12 -r1.13 --- razor2.t 18 Mar 2003 03:29:42 -0000 1.12 +++ razor2.t 23 Sep 2003 21:39:13 -0000 1.13 @@ -3,39 +3,30 @@ use lib '.'; use lib 't'; use SATest; sa_t_init("razor2"); -use constant TEST_ENABLED => (-e 't/do_razor2' || -e 'do_razor2'); +use constant TEST_ENABLED => (-e 't/do_net'); +use constant HAS_RAZOR2 => eval { require Razor2::Client::Agent; }; -use Test; BEGIN { plan tests => (TEST_ENABLED ? 2 : 0), +use Test; + +BEGIN { + plan tests => ((TEST_ENABLED && HAS_RAZOR2) ? 2 : 0), onfail => sub { - warn "\n\nNote: this may not be an SpamAssassin bug, as Razor tests can\n". - "fail due to problems with the Razor servers.\n\n"; + warn "\n\nNote: this may not be an SpamAssassin bug, as Razor tests can" . + "\nfail due to problems with the Razor servers.\n\n"; } }; -exit unless TEST_ENABLED; +exit unless (TEST_ENABLED && HAS_RAZOR2); # --------------------------------------------------------------------------- -my $razor_not_available = 0; - -eval { - require Razor2::Client::Agent; -}; - -if ($@) { - $razor_not_available = "Razor2 is not installed."; -} - my $ident = $ENV{'HOME'}.'/.razor/identity'; if (!-r $ident) { $razor_not_available = "razor-register has not been run, or $ident is unreadable."; } - %patterns = ( - q{ Listed in Razor2 }, 'spam', - ); if (!$razor_not_available) { @@ -50,11 +41,8 @@ %patterns = (); %anti_patterns = ( - q{ Listed in Razor2 }, 'nonspam', - ); sarun ("-t < data/nice/001", \&patterns_run_cb); skip_all_patterns($razor_not_available); - ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [SACVS] CVS: spamassassin/rules 20_head_tests.cf,1.280,1.281 60_whitelist.cf,1.41,1.42: 00101, Daniel Quinlan |
|---|---|
| Next by Date: | [SACVS] CVS: spamassassin Makefile.PL,1.116,1.117: 00101, Daniel Quinlan |
| Previous by Thread: | [SACVS] CVS: spamassassin/rules 20_head_tests.cf,1.280,1.281 60_whitelist.cf,1.41,1.42i: 00101, Daniel Quinlan |
| Next by Thread: | [SACVS] CVS: spamassassin Makefile.PL,1.116,1.117: 00101, Daniel Quinlan |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |