Re: [PATCH] test: replace occurrences of $PWD with vars that are more stable
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Wed, 1 Feb 2012 23:09:39 +0000 (03:09 +0400)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:43:55 +0000 (09:43 -0800)
79/887564473da7b8202b0f331f9acb944a8dcb6f [new file with mode: 0644]

diff --git a/79/887564473da7b8202b0f331f9acb944a8dcb6f b/79/887564473da7b8202b0f331f9acb944a8dcb6f
new file mode 100644 (file)
index 0000000..f006dab
--- /dev/null
@@ -0,0 +1,131 @@
+Return-Path: <dmitry.kurochkin@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 67C3A431FAF\r
+       for <notmuch@notmuchmail.org>; Wed,  1 Feb 2012 15:10:56 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 1.7\r
+X-Spam-Level: *\r
+X-Spam-Status: No, score=1.7 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, FREEMAIL_REPLY=2.499, RCVD_IN_DNSWL_LOW=-0.7]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id gb-+Z-p0RWFp for <notmuch@notmuchmail.org>;\r
+       Wed,  1 Feb 2012 15:10:55 -0800 (PST)\r
+Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com\r
+       [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 94A85431FAE\r
+       for <notmuch@notmuchmail.org>; Wed,  1 Feb 2012 15:10:55 -0800 (PST)\r
+Received: by bke11 with SMTP id 11so1704261bke.26\r
+       for <notmuch@notmuchmail.org>; Wed, 01 Feb 2012 15:10:54 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+       h=from:to:cc:subject:in-reply-to:references:user-agent:date\r
+       :message-id:mime-version:content-type;\r
+       bh=giMSz03e1r97jklaFOlGh2vO5h+83S950ZSm1hM3dDs=;\r
+       b=fkcpmdejn4TP0sI31+jOhc1cXbO8BEiBC8riGr+Bdcgq4Nm4uR+a6vrCZY62aW2xXm\r
+       T/Kx3ImhqcB143r8llsxvqL5Fydv89ktUM5Sv/ltDK7Ca4hZB8kAqf1/Cgwzh0gaBgUp\r
+       ppmaCdTl9mfjulm1CUzXgUoAYKGJqa4oZlFF0=\r
+Received: by 10.205.120.138 with SMTP id fy10mr203832bkc.118.1328137854030;\r
+       Wed, 01 Feb 2012 15:10:54 -0800 (PST)\r
+Received: from localhost ([91.144.186.21])\r
+       by mx.google.com with ESMTPS id ga13sm1243001bkc.5.2012.02.01.15.10.52\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Wed, 01 Feb 2012 15:10:52 -0800 (PST)\r
+From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
+To: Pieter Praet <pieter@praet.org>\r
+Subject: Re: [PATCH] test: replace occurrences of $PWD with vars that are more\r
+       stable\r
+In-Reply-To: <1328128641-31155-1-git-send-email-pieter@praet.org>\r
+References: <87ipjqb8c1.fsf@praet.org>\r
+       <1328128641-31155-1-git-send-email-pieter@praet.org>\r
+User-Agent: Notmuch/0.11+139~gd9b7cab (http://notmuchmail.org) Emacs/23.3.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Thu, 02 Feb 2012 03:09:39 +0400\r
+Message-ID: <878vkmm9qk.fsf@gmail.com>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Cc: Notmuch Mail <notmuch@notmuchmail.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 01 Feb 2012 23:10:56 -0000\r
+\r
+On Wed,  1 Feb 2012 21:37:21 +0100, Pieter Praet <pieter@praet.org> wrote:\r
+> Thanks to Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
+> for pointing this out:  id:"87d39ymyb4.fsf@gmail.com"\r
+> ---\r
+\r
+Looks good to me.  Minor comments below.\r
+\r
+>  test/emacs |    2 +-\r
+>  test/new   |    6 +++---\r
+>  2 files changed, 4 insertions(+), 4 deletions(-)\r
+> \r
+> diff --git a/test/emacs b/test/emacs\r
+> index 17129b7..9c9d0b4 100755\r
+> --- a/test/emacs\r
+> +++ b/test/emacs\r
+> @@ -266,7 +266,7 @@ From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
+>  To: user@example.com\r
+>  Subject: Re: Testing message sent via SMTP\r
+>  In-Reply-To: <XXX>\r
+> -Fcc: $(pwd)/mail/sent\r
+> +Fcc: ${MAIL_DIR}/sent\r
+>  --text follows this line--\r
+>  On 01 Jan 2000 12:00:00 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:\r
+>  > This is a test that messages are sent via SMTP\r
+> diff --git a/test/new b/test/new\r
+> index 49f390d..1b24c84 100755\r
+> --- a/test/new\r
+> +++ b/test/new\r
+> @@ -117,10 +117,10 @@ test_expect_equal "$output" "No new mail. Removed 3 messages."\r
+>  test_begin_subtest "New symlink to directory"\r
+>  \r
+>  rm -rf "${MAIL_DIR}"/.notmuch\r
+> -mv "${MAIL_DIR}" "$PWD"/actual_maildir\r
+> +mv "${MAIL_DIR}" "${TMP_DIRECTORY}"/actual_maildir\r
+\r
+I would prefer to put the whole second argument inside the quotes, not\r
+just the variable.\r
+\r
+>  \r
+>  mkdir "${MAIL_DIR}"\r
+> -ln -s "$PWD"/actual_maildir "${MAIL_DIR}"/symlink\r
+> +ln -s "${TMP_DIRECTORY}"/actual_maildir "${MAIL_DIR}"/symlink\r
+\r
+Same.\r
+\r
+>  \r
+>  output=$(NOTMUCH_NEW)\r
+>  test_expect_equal "$output" "Added 1 new message to the database."\r
+> @@ -128,7 +128,7 @@ test_expect_equal "$output" "Added 1 new message to the database."\r
+>  \r
+>  test_begin_subtest "New symlink to a file"\r
+>  generate_message\r
+> -external_msg_filename="$PWD"/external/"$(basename "$gen_msg_filename")"\r
+> +external_msg_filename="${TMP_DIRECTORY}"/external/"$(basename "$gen_msg_filename")"\r
+\r
+And here as well.  The quotes around "/external/" can just be removed.\r
+\r
+Regards,\r
+  Dmitry\r
+\r
+>  mkdir -p "$(dirname "$external_msg_filename")"\r
+>  mv "$gen_msg_filename" "$external_msg_filename"\r
+>  ln -s "$external_msg_filename" "$gen_msg_filename"\r
+> -- \r
+> 1.7.8.1\r