[PATCH 2 of 4] test-help: fix grep pattern for Windows

Matt Harbison mharbison72 at gmail.com
Sun Dec 13 21:42:21 CST 2015


On Sun, 13 Dec 2015 22:33:24 -0500, timeless <timeless at gmail.com> wrote:

> It's also looking for "debug" items, which shouldn't be present. So,
> the |debug should be retained.

I wondered about that, but I didn't see anything output with debug in it.   
In what case(s) does "debug" print out?

> On Sun, Dec 13, 2015 at 9:56 PM, Matt Harbison <mharbison72 at gmail.com>  
> wrote:
>> # HG changeset patch
>> # User Matt Harbison <matt_harbison at yahoo.com>
>> # Date 1450039304 18000
>> #      Sun Dec 13 15:41:44 2015 -0500
>> # Node ID 685b106ac877d0c28b0e4c2d9eed1b0498304401
>> # Parent  fd7dae9c8cff40fb46f7ba3acb10879956f4c759
>> test-help: fix grep pattern for Windows
>>
>> I'm not sure what's going on with my copy of egrep, but it doesn't seem  
>> to
>> recognize the '\S' class:
>>
>>   $ egrep --version
>>   GNU grep 2.5.4
>>   $ echo "foo" | egrep '\S'
>>   $
>>
>> The spirit of the test seems to be to print only the headers, which  
>> start
>> capitalized in the first column, so check that.
>>
>> diff --git a/tests/test-help.t b/tests/test-help.t
>> --- a/tests/test-help.t
>> +++ b/tests/test-help.t
>> @@ -1053,11 +1053,11 @@
>>
>>  Test -e / -c / -k combinations
>>
>> -  $ hg help -c|egrep '^\S|debug'
>> +  $ hg help -c|egrep '^[A-Z]'
>>    Commands:
>> -  $ hg help -e|egrep '^\S'
>> +  $ hg help -e|egrep '^[A-Z]'
>>    Extensions:
>> -  $ hg help -k|egrep '^\S'
>> +  $ hg help -k|egrep '^[A-Z]'
>>    Topics:
>>    Commands:
>>    Extensions:
>> _______________________________________________
>> Mercurial-devel mailing list
>> Mercurial-devel at selenic.com
>> https://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list