[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Support regex in EXPECTED ERR list

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Thu, 7 Feb 2013 20:53:08 +0000 (GMT)

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
Received on 2013-02-07 21:53:45 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.