git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: "Torsten Bögershausen" <tboegi@web.de>,
	git@vger.kernel.org, "Junio C Hamano" <gitster@pobox.com>,
	"Jeff King" <peff@peff.net>, "Max Horn" <max@quendi.de>,
	"Antoine Pelisse" <apelisse@gmail.com>
Subject: Re: [PATCH v2 0/4] remote-helpers: trivial test fixes
Date: Sat, 06 Apr 2013 20:41:26 +0200	[thread overview]
Message-ID: <51606C56.7060108@web.de> (raw)
In-Reply-To: <CAMP44s0tAmXxGLnKJ=+xvbMUJW_bqiK75-hKo9M3jh8J=YX-4g@mail.gmail.com>

On 06.04.13 19:58, Felipe Contreras wrote:
> On Sat, Apr 6, 2013 at 11:45 AM, Torsten Bögershausen <tboegi@web.de> wrote:
>> On 06.04.13 19:29, Felipe Contreras wrote:
>>> On Sat, Apr 6, 2013 at 11:03 AM, Torsten Bögershausen <tboegi@web.de> wrote:
> 
>>>> --- a/contrib/remote-helpers/test-hg.sh
>>>> +++ b/contrib/remote-helpers/test-hg.sh
>>>> @@ -115,7 +115,7 @@ test_expect_success 'update bookmark' '
>>>>    git push
>>>>    ) &&
>>>>
>>>> -  hg -R hgrepo bookmarks | grep "devel\s\+3:"
>>>> +  hg -R hgrepo bookmarks | egrep "devel[[:space:]]+3:"
>>>>  '
>>>
>>> I would rather use [ \t] instead.
>> That doesn't work on e.g. Mac OS.
>> [:space:] is actually portable
> 
> Why wouldn't it work? This is from their manpage:
> 
> A bracket expression is a list of characters enclosed by [ and ].  It
> matches any single character in
> that list; if the first character of the list is the caret ^ then it
> matches any character not in the
> list.  For example, the regular expression [0123456789] matches any
> single digit.
> 

It's not about the "bracket list".
It's about using \t as an abreviation for TAB.
The "backslash n" as an replacement for TAB is quite often understood by many programs.
It is not demanded to be understood by all grep implementations, please see below.
Instead of using \t you can use a literal TAB.
Contact your local editor how to put that inte source code ;-)

 
http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap09.html#tag_09_03

9.3.2 BRE Ordinary Characters

An ordinary character is a BRE that matches itself: any character in the supported character set, except for the BRE special characters listed in BRE Special Characters.

The interpretation of an ordinary character preceded by a backslash ( '\' ) is undefined, except for:

    The characters ')', '(', '{', and '}'

    The digits 1 to 9 inclusive (see BREs Matching Multiple Characters)

    A character inside a bracket expression

      reply	other threads:[~2013-04-06 18:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-04 15:36 [PATCH v2 0/4] remote-helpers: trivial test fixes Felipe Contreras
2013-04-04 15:36 ` [PATCH v2 1/4] remote-bzr: avoid echo -n Felipe Contreras
2013-04-04 15:36 ` [PATCH v2 2/4] remote-helpers: fix the run of all tests Felipe Contreras
2013-04-04 15:36 ` [PATCH v2 3/4] remote-bzr: remove stale check code for tests Felipe Contreras
2013-04-04 15:36 ` [PATCH v2 4/4] remote-hg: fix hg-git test-case Felipe Contreras
2013-04-06 17:03 ` [PATCH v2 0/4] remote-helpers: trivial test fixes Torsten Bögershausen
2013-04-06 17:09   ` Torsten Bögershausen
2013-04-06 17:29   ` Felipe Contreras
2013-04-06 17:45     ` Torsten Bögershausen
2013-04-06 17:58       ` Felipe Contreras
2013-04-06 18:41         ` Torsten Bögershausen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51606C56.7060108@web.de \
    --to=tboegi@web.de \
    --cc=apelisse@gmail.com \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=max@quendi.de \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).