From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 67C3A431FAF for ; Wed, 1 Feb 2012 15:10:56 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 1.7 X-Spam-Level: * X-Spam-Status: No, score=1.7 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=2.499, 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 gb-+Z-p0RWFp for ; Wed, 1 Feb 2012 15:10:55 -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 94A85431FAE for ; Wed, 1 Feb 2012 15:10:55 -0800 (PST) Received: by bke11 with SMTP id 11so1704261bke.26 for ; Wed, 01 Feb 2012 15:10:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; bh=giMSz03e1r97jklaFOlGh2vO5h+83S950ZSm1hM3dDs=; b=fkcpmdejn4TP0sI31+jOhc1cXbO8BEiBC8riGr+Bdcgq4Nm4uR+a6vrCZY62aW2xXm T/Kx3ImhqcB143r8llsxvqL5Fydv89ktUM5Sv/ltDK7Ca4hZB8kAqf1/Cgwzh0gaBgUp ppmaCdTl9mfjulm1CUzXgUoAYKGJqa4oZlFF0= Received: by 10.205.120.138 with SMTP id fy10mr203832bkc.118.1328137854030; Wed, 01 Feb 2012 15:10:54 -0800 (PST) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id ga13sm1243001bkc.5.2012.02.01.15.10.52 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 01 Feb 2012 15:10:52 -0800 (PST) From: Dmitry Kurochkin To: Pieter Praet Subject: Re: [PATCH] test: replace occurrences of $PWD with vars that are more stable In-Reply-To: <1328128641-31155-1-git-send-email-pieter@praet.org> References: <87ipjqb8c1.fsf@praet.org> <1328128641-31155-1-git-send-email-pieter@praet.org> User-Agent: Notmuch/0.11+139~gd9b7cab (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Thu, 02 Feb 2012 03:09:39 +0400 Message-ID: <878vkmm9qk.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 23:10:56 -0000 On Wed, 1 Feb 2012 21:37:21 +0100, Pieter Praet wrote: > Thanks to Dmitry Kurochkin > for pointing this out: id:"87d39ymyb4.fsf@gmail.com" > --- Looks good to me. Minor comments below. > 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 I would prefer to put the whole second argument inside the quotes, not just the variable. > > mkdir "${MAIL_DIR}" > -ln -s "$PWD"/actual_maildir "${MAIL_DIR}"/symlink > +ln -s "${TMP_DIRECTORY}"/actual_maildir "${MAIL_DIR}"/symlink Same. > > 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")" And here as well. The quotes around "/external/" can just be removed. Regards, Dmitry > 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