Bug 377 - consolidate header existence tests
Summary: consolidate header existence tests
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Rules (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: PC Linux
: P2 enhancement
Target Milestone: ---
Assignee: Daniel Quinlan
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-31 20:00 UTC by Daniel Quinlan
Modified: 2002-06-05 14:37 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status
working example code patch None Daniel Quinlan [HasCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Quinlan 2002-05-31 20:00:14 UTC
There are a lot of tests that just test to see if a header exists
and they could be consolidated -- all of the tests are basically the
same, the descriptions are the same, and the 20_head_tests.cf file
would be clearer if they all appeared in the same place.

The format I am testing is:

header X_EXAMPLE_HEADER_EXISTS    exists:X-Example-Header

No description line is needed, a description gets added by Conf.pm.

Currently, I continue to do the Header =~ /./ test although a faster
construction could be added to Conf.pm and/or EvalTests.pm without
changing the rule format.

Working example patch to be attached in a moment.  Comments invited.
Comment 1 Daniel Quinlan 2002-05-31 20:01:59 UTC
Created attachment 132 [details]
working example code
Comment 2 Daniel Quinlan 2002-05-31 20:03:42 UTC
You can ignore the part of the patch where DOUBLE_CAPSWORD is commented out.
Comment 3 Daniel Quinlan 2002-06-05 22:37:17 UTC
added new version of header existence tests (older ones named *_PRESENT)
Comment 4 Daniel Quinlan 2002-06-05 22:37:28 UTC
closing