Skip to content

Commit 19c29e5

Browse files
bertwesarggitster
authored andcommitted
t4014: make output-directory tests self-contained
As noted by Gábor in [1], the new tests in edefc31 ("format-patch: create leading components of output directory", 2019-10-11) cannot be run independently. Fix this. [1] https://public-inbox.org/git/[email protected]/ Signed-off-by: Bert Wesarg <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent edefc31 commit 19c29e5

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

t/t4014-format-patch.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1615,17 +1615,20 @@ test_expect_success 'format-patch -o with no leading directories' '
16151615
'
16161616

16171617
test_expect_success 'format-patch -o with leading existing directories' '
1618-
git format-patch -o patches/side master..side &&
1618+
rm -rf existing-dir &&
1619+
mkdir existing-dir &&
1620+
git format-patch -o existing-dir/patches master..side &&
16191621
count=$(git rev-list --count master..side) &&
1620-
ls patches/side >list &&
1622+
ls existing-dir/patches >list &&
16211623
test_line_count = $count list
16221624
'
16231625

16241626
test_expect_success 'format-patch -o with leading non-existing directories' '
1625-
rm -fr patches &&
1626-
git format-patch -o patches/side master..side &&
1627+
rm -rf non-existing-dir &&
1628+
git format-patch -o non-existing-dir/patches master..side &&
16271629
count=$(git rev-list --count master..side) &&
1628-
ls patches/side >list &&
1630+
test_path_is_dir non-existing-dir &&
1631+
ls non-existing-dir/patches >list &&
16291632
test_line_count = $count list
16301633
'
16311634

0 commit comments

Comments
 (0)