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

login
register
mail settings
Submitter Sean Farley
Date Feb. 26, 2015, 6:23 p.m.
Message ID <42ee11d8691ff972ef18.1424975012@1.0.0.127.in-addr.arpa>
Download mbox | patch
Permalink /patch/7837/
State Accepted
Headers show

Comments

Sean Farley - Feb. 26, 2015, 6:23 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@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.
Mads Kiilerich - Feb. 26, 2015, 9:01 p.m.
On 02/26/2015 07:23 PM, Sean Farley wrote:
> # HG changeset patch
> # User Sean Farley <sean.michael.farley@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
Sean Farley - Feb. 26, 2015, 9:04 p.m.
Mads Kiilerich writes:

> On 02/26/2015 07:23 PM, Sean Farley wrote:
>> # HG changeset patch
>> # User Sean Farley <sean.michael.farley@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 *.

Totally fine with me if a reviewer wants to change in-flight.
Matt Mackall - Feb. 28, 2015, 8:34 p.m.
On Thu, 2015-02-26 at 10:23 -0800, Sean Farley wrote:
> # HG changeset patch
> # User Sean Farley <sean.michael.farley@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

Queued with simplified glob, thanks.

Patch

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)
 #endif
 
 Empty argument must be quoted
 
   $ cat <<EOF >> $HGRCPATH