From 3476b83f1601d3170f2a7e2cf2fa6ba32edce69e Mon Sep 17 00:00:00 2001 From: Pieter Praet Date: Wed, 1 Feb 2012 21:37:21 +0100 Subject: [PATCH] [PATCH] test: replace occurrences of $PWD with vars that are more stable --- 8a/d0f68ae557598c909bb7be24bb16bc4458521a | 101 ++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 8a/d0f68ae557598c909bb7be24bb16bc4458521a diff --git a/8a/d0f68ae557598c909bb7be24bb16bc4458521a b/8a/d0f68ae557598c909bb7be24bb16bc4458521a new file mode 100644 index 000000000..503f11ac6 --- /dev/null +++ b/8a/d0f68ae557598c909bb7be24bb16bc4458521a @@ -0,0 +1,101 @@ +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 67451431FAF + for ; Wed, 1 Feb 2012 12:39:21 -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 mAnR6TdTubEM for ; + Wed, 1 Feb 2012 12:39:20 -0800 (PST) +Received: from mail-we0-f181.google.com (mail-we0-f181.google.com + [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 9FA7C431FAE + for ; Wed, 1 Feb 2012 12:39:20 -0800 (PST) +Received: by werb10 with SMTP id b10so1463404wer.26 + for ; Wed, 01 Feb 2012 12:39:19 -0800 (PST) +Received: by 10.216.136.76 with SMTP id v54mr3432026wei.30.1328128759446; + Wed, 01 Feb 2012 12:39:19 -0800 (PST) +Received: from localhost ([109.131.39.11]) + by mx.google.com with ESMTPS id dw7sm32557073wib.4.2012.02.01.12.39.18 + (version=TLSv1/SSLv3 cipher=OTHER); + Wed, 01 Feb 2012 12:39:19 -0800 (PST) +From: Pieter Praet +To: Dmitry Kurochkin +Subject: [PATCH] test: replace occurrences of $PWD with vars that are more + stable +Date: Wed, 1 Feb 2012 21:37:21 +0100 +Message-Id: <1328128641-31155-1-git-send-email-pieter@praet.org> +X-Mailer: git-send-email 1.7.8.1 +In-Reply-To: <87ipjqb8c1.fsf@praet.org> +References: <87ipjqb8c1.fsf@praet.org> +Cc: Notmuch Mail +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, 01 Feb 2012 20:39:21 -0000 + +Thanks to Dmitry Kurochkin +for pointing this out: id:"87d39ymyb4.fsf@gmail.com" +--- + test/emacs | 2 +- + test/new | 6 +++--- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/test/emacs b/test/emacs +index 17129b7..9c9d0b4 100755 +--- a/test/emacs ++++ b/test/emacs +@@ -266,7 +266,7 @@ From: Notmuch Test Suite + To: user@example.com + Subject: Re: Testing message sent via SMTP + In-Reply-To: +-Fcc: $(pwd)/mail/sent ++Fcc: ${MAIL_DIR}/sent + --text follows this line-- + On 01 Jan 2000 12:00:00 -0000, Notmuch Test Suite wrote: + > This is a test that messages are sent via SMTP +diff --git a/test/new b/test/new +index 49f390d..1b24c84 100755 +--- a/test/new ++++ b/test/new +@@ -117,10 +117,10 @@ test_expect_equal "$output" "No new mail. Removed 3 messages." + test_begin_subtest "New symlink to directory" + + rm -rf "${MAIL_DIR}"/.notmuch +-mv "${MAIL_DIR}" "$PWD"/actual_maildir ++mv "${MAIL_DIR}" "${TMP_DIRECTORY}"/actual_maildir + + mkdir "${MAIL_DIR}" +-ln -s "$PWD"/actual_maildir "${MAIL_DIR}"/symlink ++ln -s "${TMP_DIRECTORY}"/actual_maildir "${MAIL_DIR}"/symlink + + output=$(NOTMUCH_NEW) + test_expect_equal "$output" "Added 1 new message to the database." +@@ -128,7 +128,7 @@ test_expect_equal "$output" "Added 1 new message to the database." + + test_begin_subtest "New symlink to a file" + generate_message +-external_msg_filename="$PWD"/external/"$(basename "$gen_msg_filename")" ++external_msg_filename="${TMP_DIRECTORY}"/external/"$(basename "$gen_msg_filename")" + mkdir -p "$(dirname "$external_msg_filename")" + mv "$gen_msg_filename" "$external_msg_filename" + ln -s "$external_msg_filename" "$gen_msg_filename" +-- +1.7.8.1 -- 2.26.2