summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-10-24 04:34:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-10-24 04:34:02 (GMT)
commitc555caab7a303109d6c712d757bc4621a3ee0bbd (patch)
tree5a62e83c166de7b01ecdc3faa469f156a464a94d
parent1b4f85285f438d561d63b7e510e9e244eabc2d80 (diff)
parent19c29e538e48ed50286339b0fdd5e62111a724db (diff)
downloadgit-c555caab7a303109d6c712d757bc4621a3ee0bbd.zip
git-c555caab7a303109d6c712d757bc4621a3ee0bbd.tar.gz
git-c555caab7a303109d6c712d757bc4621a3ee0bbd.tar.bz2
Merge branch 'bw/format-patch-o-create-leading-dirs'
Test update. * bw/format-patch-o-create-leading-dirs: t4014: make output-directory tests self-contained
-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 9facc3a..b896999 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
'