@@ -20,11 +20,7 @@ test_expect_success 'empty directories exist' '
20
20
cd cloned &&
21
21
for i in a b c d d/e d/e/f "weird file name"
22
22
do
23
- if ! test -d "$i"
24
- then
25
- echo >&2 "$i does not exist" &&
26
- exit 1
27
- fi
23
+ test_path_is_dir "$i" || exit 1
28
24
done
29
25
)
30
26
'
@@ -37,11 +33,7 @@ test_expect_success 'option automkdirs set to false' '
37
33
git svn fetch &&
38
34
for i in a b c d d/e d/e/f "weird file name"
39
35
do
40
- if test -d "$i"
41
- then
42
- echo >&2 "$i exists" &&
43
- exit 1
44
- fi
36
+ test_path_is_missing "$i" || exit 1
45
37
done
46
38
)
47
39
'
@@ -52,7 +44,7 @@ test_expect_success 'more emptiness' '
52
44
53
45
test_expect_success ' git svn rebase creates empty directory' '
54
46
( cd cloned && git svn rebase ) &&
55
- test -d cloned/"! !"
47
+ test_path_is_dir cloned/"! !"
56
48
'
57
49
58
50
test_expect_success ' git svn mkdirs recreates empty directories' '
@@ -62,11 +54,7 @@ test_expect_success 'git svn mkdirs recreates empty directories' '
62
54
git svn mkdirs &&
63
55
for i in a b c d d/e d/e/f "weird file name" "! !"
64
56
do
65
- if ! test -d "$i"
66
- then
67
- echo >&2 "$i does not exist" &&
68
- exit 1
69
- fi
57
+ test_path_is_dir "$i" || exit 1
70
58
done
71
59
)
72
60
'
@@ -78,25 +66,13 @@ test_expect_success 'git svn mkdirs -r works' '
78
66
git svn mkdirs -r7 &&
79
67
for i in a b c d d/e d/e/f "weird file name"
80
68
do
81
- if ! test -d "$i"
82
- then
83
- echo >&2 "$i does not exist" &&
84
- exit 1
85
- fi
69
+ test_path_is_dir "$i" || exit 1
86
70
done &&
87
71
88
- if test -d "! !"
89
- then
90
- echo >&2 "$i should not exist" &&
91
- exit 1
92
- fi &&
72
+ test_path_is_missing "! !" || exit 1 &&
93
73
94
74
git svn mkdirs -r8 &&
95
- if ! test -d "! !"
96
- then
97
- echo >&2 "$i not exist" &&
98
- exit 1
99
- fi
75
+ test_path_is_dir "! !" || exit 1
100
76
)
101
77
'
102
78
@@ -114,11 +90,7 @@ test_expect_success 'empty directories in trunk exist' '
114
90
cd trunk &&
115
91
for i in a "weird file name"
116
92
do
117
- if ! test -d "$i"
118
- then
119
- echo >&2 "$i does not exist" &&
120
- exit 1
121
- fi
93
+ test_path_is_dir "$i" || exit 1
122
94
done
123
95
)
124
96
'
@@ -129,7 +101,7 @@ test_expect_success 'remove a top-level directory from svn' '
129
101
130
102
test_expect_success ' removed top-level directory does not exist' '
131
103
git svn clone "$svnrepo" removed &&
132
- test ! -e removed/d
104
+ test_path_is_missing removed/d
133
105
134
106
'
135
107
unhandled=.git/svn/refs/remotes/git-svn/unhandled.log
@@ -143,15 +115,11 @@ test_expect_success 'git svn gc-ed files work' '
143
115
svn_cmd mkdir -m gz "$svnrepo"/gz &&
144
116
git reset --hard $(git rev-list HEAD | tail -1) &&
145
117
git svn rebase &&
146
- test -f "$unhandled".gz &&
147
- test -f "$unhandled" &&
118
+ test_path_is_file "$unhandled".gz &&
119
+ test_path_is_file "$unhandled" &&
148
120
for i in a b c "weird file name" gz "! !"
149
121
do
150
- if ! test -d "$i"
151
- then
152
- echo >&2 "$i does not exist" &&
153
- exit 1
154
- fi
122
+ test_path_is_dir "$i" || exit 1
155
123
done
156
124
fi
157
125
)
0 commit comments