Skip to content

Commit 0332e81

Browse files
shejialuogitster
authored andcommitted
t9117: prefer test_path_* helper functions
test -(e|d) does not provide a nice error message when we hit test failures, so use test_path_exists, test_path_is_dir instead. Signed-off-by: shejialuo <[email protected]> Acked-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b387623 commit 0332e81

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

t/t9117-git-svn-init-clone.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,32 @@ test_expect_success 'setup svnrepo' '
1717
test_expect_success 'basic clone' '
1818
test ! -d trunk &&
1919
git svn clone "$svnrepo"/project/trunk &&
20-
test -d trunk/.git/svn &&
21-
test -e trunk/foo &&
20+
test_path_is_dir trunk/.git/svn &&
21+
test_path_exists trunk/foo &&
2222
rm -rf trunk
2323
'
2424

2525
test_expect_success 'clone to target directory' '
2626
test ! -d target &&
2727
git svn clone "$svnrepo"/project/trunk target &&
28-
test -d target/.git/svn &&
29-
test -e target/foo &&
28+
test_path_is_dir target/.git/svn &&
29+
test_path_exists target/foo &&
3030
rm -rf target
3131
'
3232

3333
test_expect_success 'clone with --stdlayout' '
3434
test ! -d project &&
3535
git svn clone -s "$svnrepo"/project &&
36-
test -d project/.git/svn &&
37-
test -e project/foo &&
36+
test_path_is_dir project/.git/svn &&
37+
test_path_exists project/foo &&
3838
rm -rf project
3939
'
4040

4141
test_expect_success 'clone to target directory with --stdlayout' '
4242
test ! -d target &&
4343
git svn clone -s "$svnrepo"/project target &&
44-
test -d target/.git/svn &&
45-
test -e target/foo &&
44+
test_path_is_dir target/.git/svn &&
45+
test_path_exists target/foo &&
4646
rm -rf target
4747
'
4848

0 commit comments

Comments
 (0)