http://bugzilla.spamassassin.org/show_bug.cgi?id=3053

           Summary: strip2.t is flawed ...
           Product: Spamassassin
           Version: SVN Trunk (Latest Devel Version)
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: Regression Tests
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]


I spent a good 2 hours trying to figure out why this test wasn't working...  
Come to find out that it 
apparently has never worked, at least in the current incarnation.  Here's what 
happens right now:

        /usr/bin/perl -T -w ../spamassassin -C log/test_rules_copy  
--siteconfigpath log/localrules.tmp 
-p log/test_default.cf  -L -t < data/spam/002 > log/strip2.munged
        /usr/bin/perl -T -w ../spamassassin -C log/test_rules_copy  
--siteconfigpath log/localrules.tmp 
-p log/test_default.cf  -d < log/strip2.munged > log/strip2.output
Use of uninitialized value in substitution (s///) at 
../blib/lib/Mail/SpamAssassin.pm line 906.
Use of uninitialized value in substitution (s///) at 
../blib/lib/Mail/SpamAssassin.pm line 909.
Use of uninitialized value in pattern match (m//) at 
../blib/lib/Mail/SpamAssassin.pm line 912.
Use of uninitialized value in pattern match (m//) at 
../blib/lib/Mail/SpamAssassin.pm line 921.
Use of uninitialized value in pattern match (m//) at 
../blib/lib/Mail/SpamAssassin.pm line 927.
Use of uninitialized value in substitution (s///) at 
../blib/lib/Mail/SpamAssassin.pm line 932.
ok 1

The uninitialized value bit is new due to other code I put in ...  That's 
actually the only reason I noticed 
the problems with the test.

What happens is that the first sarun call tries to create strip2.munged ...  
Except that sarun() itself 
redirects to log/<name of test>.<number of test> ...  So strip2.munged becomes 
a blank file.  The 
second sarun() call tries to strip the markup of a blank message, which results 
in a blank message.  The 
results are diff'ed and found to be ok (blank == blank), so the test passes.


So we either need to figure out how to get the output another way, we need to 
use the log/
<testname>.<testnumber> file, or we should have sarun() not redirect if the 
command we're running 
includes a '>' to redirect the output...



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

Reply via email to