From: Michal Nazarewicz <mina86@mina86.com>
To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org
Subject: Re: [PATCH 3/3] test: use perl instead of sed -r for portability
Date: Wed, 05 Dec 2012 00:01:07 +0100 [thread overview]
Message-ID: <xa1tip8h2zik.fsf@mina86.com> (raw)
In-Reply-To: <66f7d91d6d2425149b5f4063274a6402662b9257.1354656085.git.jani@nikula.org>
[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]
On Tue, Dec 04 2012, Jani Nikula wrote:
> Our OS X users report -r is not a supported option for sed. Use perl
> instead.
> ---
> test/test-lib.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/test/test-lib.sh b/test/test-lib.sh
> index f169785..31ed107 100644
> --- a/test/test-lib.sh
> +++ b/test/test-lib.sh
> @@ -576,7 +576,7 @@ NOTMUCH_NEW ()
>
> notmuch_search_sanitize ()
> {
> - sed -r -e 's/("?thread"?: ?)("?)................("?)/\1\2XXX\3/'
> + perl -pe 's/("?thread"?: ?)("?)................("?)/\1\2XXX\3/'
Alternatively, this could just be convert into a basic regexp:
sed -e 's/\("\?thread"\?: \?"\?\)................\("\?\)/\1XXX\2/'
which I think is even more portable, no?
> }
>
> NOTMUCH_SHOW_FILENAME_SQUELCH='s,filename:.*/mail,filename:/XXX/mail,'
--
Best regards, _ _
.o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michał “mina86” Nazarewicz (o o)
ooo +----<email/xmpp: mpn@google.com>--------------ooO--(_)--Ooo--
[-- Attachment #2.1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2.2: Type: application/pgp-signature, Size: 835 bytes --]
next prev parent reply other threads:[~2012-12-04 23:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-04 21:26 [PATCH 0/3] test fixes, portability Jani Nikula
2012-12-04 21:26 ` [PATCH 1/3] test: fix count test Jani Nikula
2012-12-04 23:04 ` Michal Nazarewicz
2012-12-05 8:05 ` Jani Nikula
2012-12-05 20:13 ` Michal Nazarewicz
2012-12-05 21:23 ` Jani Nikula
2012-12-06 13:45 ` Michal Nazarewicz
2012-12-04 21:26 ` [PATCH 2/3] test: wrap 'wc -l' results in arithmetic evaluation to strip whitespace Jani Nikula
2012-12-04 21:26 ` [PATCH 3/3] test: use perl instead of sed -r for portability Jani Nikula
2012-12-04 23:01 ` Michal Nazarewicz [this message]
2012-12-05 8:13 ` Jani Nikula
2012-12-04 22:55 ` [PATCH 0/3] test fixes, portability Tomi Ollila
2012-12-08 13:35 ` David Bremner
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
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xa1tip8h2zik.fsf@mina86.com \
--to=mina86@mina86.com \
--cc=jani@nikula.org \
--cc=notmuch@notmuchmail.org \
/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.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
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 read-only IMAP folder(s) and NNTP newsgroup(s).