From f28242237e7c680881b6a0b2d36a2dc6dbc6d9e9 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Wed, 5 Dec 2012 09:13:14 +0100 Subject: [PATCH] Re: [PATCH 3/3] test: use perl instead of sed -r for portability --- 74/b7c9300ae6fd06c786bb830ae78a5ed24c76e4 | 110 ++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 74/b7c9300ae6fd06c786bb830ae78a5ed24c76e4 diff --git a/74/b7c9300ae6fd06c786bb830ae78a5ed24c76e4 b/74/b7c9300ae6fd06c786bb830ae78a5ed24c76e4 new file mode 100644 index 000000000..8260cf346 --- /dev/null +++ b/74/b7c9300ae6fd06c786bb830ae78a5ed24c76e4 @@ -0,0 +1,110 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id F16E8431FB6 + for ; Wed, 5 Dec 2012 00:13:26 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id VoeipyKMKZZs for ; + Wed, 5 Dec 2012 00:13:22 -0800 (PST) +Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com + [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id F3802431FAE + for ; Wed, 5 Dec 2012 00:13:21 -0800 (PST) +Received: by mail-bk0-f53.google.com with SMTP id j5so2487117bkw.26 + for ; Wed, 05 Dec 2012 00:13:20 -0800 (PST) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=google.com; s=20120113; + h=from:to:subject:in-reply-to:references:user-agent:date:message-id + :mime-version:content-type:content-transfer-encoding + :x-gm-message-state; + bh=CqqdvOFPCN44FgplX/50/ERevfl9whFmMED1pDkGa6g=; + b=Wxmrj0lg4WjsVsiEWTs6mz1mbIwpSpafag3EdE6Gv+c0k6YwRCycEG6wwVTeEJaT+N + 31d60rI6eM7Dj7hCax8vOX8zfFl+1MInuyLif801dU/GcL9glxGP4ABvXyH2lV43yUIl + HOfjYMWIp079xoSfnf1v+LNcU3y2sz/zeR/G+FELxS43Vj6dcr6eLBK4C94RCDPmkH/S + 1ESbCPT0aNnB6D/Zl+scMl/E+iOWrTTOlQ5BxEIbiMBLwH1pkxoZ2BBsSDW44veTOyi1 + AtA+Mz25cyUeFqmQWniK4puWhQ7wZE3UYj1geuWnI8QwZ+46yz5iIxbWxuD0lzVrVg0l + oQHA== +Received: by 10.204.130.140 with SMTP id t12mr5049432bks.39.1354695200419; + Wed, 05 Dec 2012 00:13:20 -0800 (PST) +Received: from localhost ([2001:4b98:dc0:43:216:3eff:fe1b:25f3]) + by mx.google.com with ESMTPS id l17sm2832377bkw.12.2012.12.05.00.13.18 + (version=SSLv3 cipher=OTHER); Wed, 05 Dec 2012 00:13:19 -0800 (PST) +From: Jani Nikula +To: Michal Nazarewicz , notmuch@notmuchmail.org +Subject: Re: [PATCH 3/3] test: use perl instead of sed -r for portability +In-Reply-To: +References: + <66f7d91d6d2425149b5f4063274a6402662b9257.1354656085.git.jani@nikula.org> + +User-Agent: Notmuch/0.14+137~gda2ee8b (http://notmuchmail.org) Emacs/23.2.1 + (x86_64-pc-linux-gnu) +Date: Wed, 05 Dec 2012 09:13:14 +0100 +Message-ID: <874nk0udb9.fsf@nikula.org> +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: quoted-printable +X-Gm-Message-State: + ALoCoQk3Y4/wCcdSI1lWVJiIiloRd84zWAZHt6mYdsYRk2Ofdyi/Ktu+IyqXgdv1ElupXtvqTzbM +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Wed, 05 Dec 2012 08:13:27 -0000 + +On Wed, 05 Dec 2012, Michal Nazarewicz wrote: +> 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 () +>>=20=20 +>> 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? + +I don't know. + +Jani. + +> +>> } +>>=20=20 +>> NOTMUCH_SHOW_FILENAME_SQUELCH=3D's,filename:.*/mail,filename:/XXX/mail,' +> +> --=20 +> Best regards, _ _ +> .o. | Liege of Serenely Enlightened Majesty of o' \,=3D./ `o +> ..o | Computer Science, Micha=C5=82 =E2=80=9Cmina86=E2=80=9D Nazarewicz = + (o o) +> ooo +------------------ooO--(_)--Ooo-- -- 2.26.2