[PATCH RFC] tests: require regexes in unified tests to be marked with " (re)"
Adrian Buehlmann
adrian at cadifra.com
Tue Sep 21 19:34:14 CDT 2010
On 21.09.2010 20:36, Brodie Rao wrote:
> # HG changeset patch
> # User Brodie Rao <brodie at bitheap.org>
> # Date 1285094123 18000
> # Node ID 2ba3c74f410285bb2da18f6f5fa6ea3b863b8c94
> # Parent dbca8f134f00fb10f7154b2f6cd9b8188095b1de
> tests: require regexes in unified tests to be marked with " (re)"
>
> Consider this test:
>
> $ hg glog --template '{rev}:{node|short} "{desc}"\n'
> @ 2:20c4f79fd7ac "3"
> |
> | o 1:38f24201dcab "2"
> |/
> o 0:2a18120dc1c9 "1"
>
> Because each line beginning with "|" can be compiled as a regular
> expression (equivalent to ".*|"), they will match any output.
>
> By requiring regular expressions to be marked with " (re)", we reduce
> the potential for false negatives.
>
> To match a line ending in " (re)", the line can be suffixed with "
> (re) (plain)". " (plain)" has no effect anywhere else.
>
After further thinking, I'm retracting my opposition against this
approach. I think this patch is the lesser evil than the status quo (and
the inexistent better solution I was hoping for).
Sorry for the noise and thanks to parren for the idea and to brodie for
hammering out the details.
More information about the Mercurial-devel
mailing list