> -----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