Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert Wesarg <bert.wesarg@googlemail.com>2019-10-21 16:23:42 +0300
committerJunio C Hamano <gitster@pobox.com>2019-10-23 05:08:58 +0300
commit19c29e538e48ed50286339b0fdd5e62111a724db (patch)
tree98ab4fa777e62a598f9cd9afc581f63686282a45 /t/t4014-format-patch.sh
parentedefc318731f69c3e5354ead9f7505e789562375 (diff)
t4014: make output-directory tests self-contained
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4014-format-patch.sh')
-rwxr-xr-xt/t4014-format-patch.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index c455181e1d..93a1656f29 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
'