[PATCH STABLE] test: make test-extdiff resilient to */gnubin/echo

Mads Kiilerich mads at kiilerich.com
Thu Feb 26 15:01:12 CST 2015


On 02/26/2015 07:23 PM, Sean Farley wrote:
> # HG changeset patch
> # User Sean Farley <sean.michael.farley at gmail.com>
> # Date 1424974984 28800
> #      Thu Feb 26 10:23:04 2015 -0800
> # Branch stable
> # Node ID 42ee11d8691ff972ef185b7a8d75a0eb9d691c75
> # Parent  d65ecb814fc0092cfa30a1eb09eed6f97a2510b2
> test: make test-extdiff resilient to */gnubin/echo
>
> My Mac test machine has 'echo' in '/opt/local/libexec/gnubin/echo' since, well,
> GNU is not BSD.
>
> Also, I feel it need to be said about using regexes:
>
> Some people, when confronted with a problem, think "I know, I'll use regular
> expressions." Now they have two problems.
>
> diff --git a/tests/test-extdiff.t b/tests/test-extdiff.t
> --- a/tests/test-extdiff.t
> +++ b/tests/test-extdiff.t
> @@ -177,11 +177,11 @@ Test pre-72a89cf86fcd backward compatibi
>     > EOF
>   #if windows
>   TODO
>   #else
>     $ hg --debug odd | grep '^running'
> -  running "*/bin/echo --foo='sp ace' 'sp ace' --bar='sp ace' 'sp ace'" in * (glob)
> +  running "*/*bin/echo --foo='sp ace' 'sp ace' --bar='sp ace' 'sp ace'" in * (glob)

The actual executable name is not that relevant here. Just use */echo 
... or perhaps just *.

/Mads



More information about the Mercurial-devel mailing list