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 2005/06/02 03:38:12 UTC

svn commit: r179481 - in /spamassassin/trunk/t: SATest.pm bayesdbm.t bayesdbm_flock.t bayessdbm.t

Author: jm
Date: Wed Jun  1 18:38:11 2005
New Revision: 179481

URL: http://svn.apache.org/viewcvs?rev=179481&view=rev
Log:
adding more strict returned-score checking in Bayes tests, since they'd probably pass even if the score was undef (ie for failures)

Modified:
    spamassassin/trunk/t/SATest.pm
    spamassassin/trunk/t/bayesdbm.t
    spamassassin/trunk/t/bayesdbm_flock.t
    spamassassin/trunk/t/bayessdbm.t

Modified: spamassassin/trunk/t/SATest.pm
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/t/SATest.pm?rev=179481&r1=179480&r2=179481&view=diff
==============================================================================
--- spamassassin/trunk/t/SATest.pm (original)
+++ spamassassin/trunk/t/SATest.pm Wed Jun  1 18:38:11 2005
@@ -490,6 +490,7 @@
 		     userprefs_filename => 'log/test_default.cf',
 		     userstate_dir => 'log/user_state',
 		     local_tests_only => 1,
+                     # debug => 'all',
 		   );
 
   # override default args

Modified: spamassassin/trunk/t/bayesdbm.t
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/t/bayesdbm.t?rev=179481&r1=179480&r2=179481&view=diff
==============================================================================
--- spamassassin/trunk/t/bayesdbm.t (original)
+++ spamassassin/trunk/t/bayesdbm.t Wed Jun  1 18:38:11 2005
@@ -224,7 +224,7 @@
 # so just make sure that the score wasn't equal to .5 which is the default
 # return value.
 print "\treturned score: $score\n";
-ok($score != .5);
+ok($score =~ /\d/ && $score <= 1.0 && $score != .5);
 
 open(MAIL,"< ../sample-spam.txt");
 
@@ -247,7 +247,7 @@
 # so just make sure that the score wasn't equal to .5 which is the default
 # return value.
 print "\treturned score: $score\n";
-ok($score != .5);
+ok($score =~ /\d/ && $score <= 1.0 && $score != .5);
 
 }
 

Modified: spamassassin/trunk/t/bayesdbm_flock.t
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/t/bayesdbm_flock.t?rev=179481&r1=179480&r2=179481&view=diff
==============================================================================
--- spamassassin/trunk/t/bayesdbm_flock.t (original)
+++ spamassassin/trunk/t/bayesdbm_flock.t Wed Jun  1 18:38:11 2005
@@ -225,7 +225,7 @@
 # so just make sure that the score wasn't equal to .5 which is the default
 # return value.
 print "\treturned score: $score\n";
-ok($score != .5);
+ok($score =~ /\d/ && $score <= 1.0 && $score != .5);
 
 open(MAIL,"< ../sample-spam.txt");
 
@@ -248,7 +248,7 @@
 # so just make sure that the score wasn't equal to .5 which is the default
 # return value.
 print "\treturned score: $score\n";
-ok($score != .5);
+ok($score =~ /\d/ && $score <= 1.0 && $score != .5);
 
 }
 

Modified: spamassassin/trunk/t/bayessdbm.t
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/t/bayessdbm.t?rev=179481&r1=179480&r2=179481&view=diff
==============================================================================
--- spamassassin/trunk/t/bayessdbm.t (original)
+++ spamassassin/trunk/t/bayessdbm.t Wed Jun  1 18:38:11 2005
@@ -229,7 +229,7 @@
 # so just make sure that the score wasn't equal to .5 which is the default
 # return value.
 print "\treturned score: $score\n";
-ok($score != .5);
+ok($score =~ /\d/ && $score <= 1.0 && $score != .5);
 
 open(MAIL,"< ../sample-spam.txt");
 
@@ -252,7 +252,7 @@
 # so just make sure that the score wasn't equal to .5 which is the default
 # return value.
 print "\treturned score: $score\n";
-ok($score != .5);
+ok($score =~ /\d/ && $score <= 1.0 && $score != .5);
 
 }