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

[PATCH] Support regex in EXPECTED ERR list

From: Prabhu Gnana Sundar <prabhugs_at_collab.net>
Date: Wed, 23 Jan 2013 13:08:50 +0530

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.

Earlier, only *exact* entries in the list were checked for match and hence
the above example wouldnt match successfully.

But here, the entry in the EXPECTED ERR list is expected to start with
".*" to treat that particular list entry as regex. I could not think of
an easier/simpler way to solve this. Please share your thoughts.

Attaching the log message and the patch with this mail.

Thanks and regards
Prabhu

Received on 2013-01-23 08:39:41 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.