Bug 537 - EvalTests.pm 1.180 is a mistaken commit?
Summary: EvalTests.pm 1.180 is a mistaken commit?
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Libraries (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Daniel Quinlan
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-11 09:40 UTC by Bart Schaefer
Modified: 2002-08-04 09:01 UTC (History)
1 user (show)



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Bart Schaefer 2002-07-11 09:40:26 UTC
I think this change in EvalTests.pm makes partial_rfc_2369() a no-op:

 -  return (exists $count{'List-Unsubscribe'} && $#count < 2);
 +  return (exists $count{'List-Unsubscribe'} && $#count < 1);

(If one element of %count exists, $#count can't possibly be less than 1?)
Comment 1 Theo Van Dinter 2002-07-11 09:53:58 UTC
Subject: Re: [SAdev]  New: EvalTests.pm 1.180 is a mistaken commit?

On Thu, Jul 11, 2002 at 09:40:27AM -0700, bugzilla-daemon@hughes-family.org wrote:
> I think this change in EvalTests.pm makes partial_rfc_2369() a no-op:
> 
>  -  return (exists $count{'List-Unsubscribe'} && $#count < 2);
>  +  return (exists $count{'List-Unsubscribe'} && $#count < 1);
> 
> (If one element of %count exists, $#count can't possibly be less than 1?)

$#count refers to @count (# of last element in @count).  $count{'...'}
refers to %count.  They're different.  So this question can't be answered
unless we know what's in @count.

I don't know what this test is trying to do specifically, but if you mean
"at least 2 elements in the hash", it'd be:

return (exists $count{'List-Unsubscribe'} && keys %count < 2);

Comment 2 Justin Mason 2002-07-11 09:56:03 UTC
nope -- if 1 exists it'll return 1, if 2 or more exist, it'll return 0.
2 headers is what yahoo! groups send.
Comment 3 Daniel Quinlan 2002-07-11 22:21:20 UTC
This change will make the test almost useless.

Please attach a yahoo groups email and I will find a better way to exempt them.
Comment 4 Daniel Quinlan 2002-07-14 19:35:29 UTC
reminder for myself to look at this change... I may have been hasty in
my previous assessment.
Comment 5 Justin Mason 2002-07-29 11:08:04 UTC
any update on this? it's a WORKSFORME in my case ;)
Comment 6 Daniel Quinlan 2002-08-04 17:01:28 UTC
finally got around to looking at this... new test works fine although I'm
going to name it more properly since the test has changed from the original
version.