You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@btopenworld.com> on 2013/02/07 21:53:08 UTC
Re: [PATCH] Support regex in EXPECTED ERR list
Prabhu Gnana Sundar wrote on 2012-01-28:
> On 01/25/2013 01:47 PM, Ben Reser wrote:
>> 1) Build a new class (could be named RegexListOutput) like I mention
>> above or in an earlier email. This will likely be a tad easier, since
>> you don't change the logic existing tests are using and thus you don't
>> have to do do negative testing against all the tests (which is
>> probably a lot) that use the existing classes.
>>
>> 2) Adjust RegexOutput so that it can handle more than one Regex. It's
>> already expecting a list, it just ignores everything but the first
>> member. This is probably the cleaner approach but you need to at a
>> minimum go through and check every use of RegexOutput to make sure it
>> isn't passing multiple regexes and consider what the impact is.
>> You'll also need to be very careful not to change the logic the
>> existing users of RegexOutput depend on.
>
> Thanks a lot Ben...
>
> I have taken your suggestion (2) and worked on it.
> Attaching the updated patch and the log message. Please share your thoughts.
The ExpectedOutput classes were a mess, with multiple behaviours all implemented in the base class controlled by flags like "match_all" and "is_regex" that didn't have cleanly orthogonal meanings.
I didn't want to make this worse by applying a patch that adds yet another flag that has unclear interactions with the existing ones.
Over the last couple of days I cleaned up the classes, and then in <http://svn.apache.org/r1443718> implemented this as a new class, 'RegexListOutput'.
- Julian