Bug 13048 - Add an optional containsall attribute to LineContains
Summary: Add an optional containsall attribute to LineContains
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.5.1
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: 1.5.2
Assignee: Ant Notifications List
Keywords: PatchAvailable
Depends on:
Reported: 2002-09-26 21:17 UTC by Eric Pugh
Modified: 2015-06-12 04:22 UTC (History)
0 users

Patch file for Testcases and LineContains (8.17 KB, patch)
2002-09-26 21:21 UTC, Eric Pugh
Details | Diff
Zip of files for Testcases (1.23 KB, application/octet-stream)
2002-09-26 21:24 UTC, Eric Pugh

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Pugh 2002-09-26 21:17:32 UTC
Hi all,

The LineContains filter did not work on my box with a CVS build of Ant.  I 
created a testcase that validated that it did not work.  I have since fixed 
it.  However, I also added another feature as well.  I added a parameter 
containsAll that allows you to either specify that a line must contain ALL of 
the values, or it can contain ANY of the values.  By default for backward 
comptablity it is optional and true.  

The new testcase for LineContains and the patched line contains I'll attache.  
After I spent time adding the containsAll option, it turned out I didn't need 
it.  so if the committers don't want the linecontains containsAll option, it 
can be removed easily.

Eric Pugh
Comment 1 Eric Pugh 2002-09-26 21:21:54 UTC
Created attachment 3250 [details]
Patch file for Testcases and LineContains
Comment 2 Eric Pugh 2002-09-26 21:24:08 UTC
Created attachment 3251 [details]
Zip of files for Testcases
Comment 3 Stefan Bodewig 2002-09-30 12:10:45 UTC
I've committed part of your patch to CVS HEAD (and will commit it to the branch
leading to 1.5.1 shortly) - linecontains should now work.

I'm degrading the containsall part of your patch to enhancement.

Comment 4 Stefan Bodewig 2002-09-30 12:29:23 UTC
It already has been fixed for 1.5.1 as part of the fix for Bug 9762, just not
being merged into the main branch.
Comment 5 Jan Mat 2015-06-10 20:04:44 UTC
This is not in the 1.9.6 codebase.
Should be integrate that?
Comment 6 Stefan Bodewig 2015-06-12 04:22:22 UTC
What went into 1.5 in order to fix this was https://github.com/apache/ant/commit/106185e44b48def793968eb9cab1ecc5ee085e3f#diff-96b58c2ec6649c0b21f33ce48d71c120 - the master branch version of which is https://github.com/apache/ant/commit/6a012bdb4cf3d536421a4fcc996e9427842df8d6#diff-96b58c2ec6649c0b21f33ce48d71c120 - so this should be fixed since about thirteen years. :-)