All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bert Wesarg <bert.wesarg@googlemail.com>
To: git@vger.kernel.org
Cc: "Bert Wesarg" <bert.wesarg@googlemail.com>,
	"Denton Liu" <liu.denton@gmail.com>,
	"Junio C Hamano" <gitster@pobox.com>,
	"SZEDER Gábor" <szeder.dev@gmail.com>
Subject: [PATCH] t4014: make output-directory tests self-contained
Date: Mon, 21 Oct 2019 15:23:42 +0200	[thread overview]
Message-ID: <8451a4dac2e1dfaae130786444531ad85807fdf7.1571664168.git.bert.wesarg@googlemail.com> (raw)

As noted by Gábor in [1], the new tests in edefc31873 ("format-patch:
create leading components of output directory", 2019-10-11) cannot be
run independently. Fix this.

[1] https://public-inbox.org/git/20191011144650.GM29845@szeder.dev/

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
---
Cc: Denton Liu <liu.denton@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>
Cc: SZEDER Gábor <szeder.dev@gmail.com>
---
 t/t4014-format-patch.sh | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index 9facc3a79e..b8969998b5 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -1615,17 +1615,20 @@ test_expect_success 'format-patch -o with no leading directories' '
 '
 
 test_expect_success 'format-patch -o with leading existing directories' '
-	git format-patch -o patches/side master..side &&
+	rm -rf existing-dir &&
+	mkdir existing-dir &&
+	git format-patch -o existing-dir/patches master..side &&
 	count=$(git rev-list --count master..side) &&
-	ls patches/side >list &&
+	ls existing-dir/patches >list &&
 	test_line_count = $count list
 '
 
 test_expect_success 'format-patch -o with leading non-existing directories' '
-	rm -fr patches &&
-	git format-patch -o patches/side master..side &&
+	rm -rf non-existing-dir &&
+	git format-patch -o non-existing-dir/patches master..side &&
 	count=$(git rev-list --count master..side) &&
-	ls patches/side >list &&
+	test_path_is_dir non-existing-dir &&
+	ls non-existing-dir/patches >list &&
 	test_line_count = $count list
 '
 
-- 
2.23.0.13.g28bc381d7c


                 reply	other threads:[~2019-10-21 13:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8451a4dac2e1dfaae130786444531ad85807fdf7.1571664168.git.bert.wesarg@googlemail.com \
    --to=bert.wesarg@googlemail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=liu.denton@gmail.com \
    --cc=szeder.dev@gmail.com \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.