[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: Bert Huijben <bert_at_qqmail.nl>
Date: Wed, 23 Jan 2013 11:54:37 +0100

> -----Original Message-----
> From: Prabhu Gnana Sundar [mailto:prabhugs_at_collab.net]
> Sent: woensdag 23 januari 2013 08:39
> To: dev_at_subversion.apache.org
> Subject: [PATCH] Support regex in EXPECTED ERR list
>
> Hi,
>
> Just while writing test cases for the svnadmin verify --keep-going
> feature I realized that we do not support regex in the EXPECTED ERR list
> and felt that it would be really helpful if we supported. So I came up
> with this patch.
>
> This patch would support regex in the entries of the EXPECTED ERR list.
>
> Example:
> ------------
>
> Expected err = ["* Verified revision 1.",
> "* Error verifying revision 2.",
> ".*svnadmin: E160004*",
> "* Verified revision 3.",
> ".*svnadmin: E165005*"]
>
> Actual err = ["* Verified revision 1.",
> "* Error verifying revision 2.",
> "svnadmin: E160004: Invalid change kind in rev file",
> "* Verified revision 3.",
> "svnadmin: E165005: Repository
> 'svn-test-work/repositories/svnadmin_tests-32' failed to verify"]
>
> The above Expected err and Actual err would match successfully.

I think you should be able to do this without your patch if you use

expected_err = svntest.verify.RegexOutput([
   # lines here
])

Instead of
expected_err = [
   # lines here
]

Just like how we handle separate kinds of output (items, unordered, regex,
unordered regex, any text, or a plain list)

        Bert
Received on 2013-01-23 11:55:26 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.