t/t7003-filter-branch.sh: use test_must_fail rather than '!'
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Casey committed
Mar 20, 2008 at 11:54 UTC
c8a086929060eef9f0ce9f149d9dc22a6df6b85a
1 file changed
+6
-6
t/t7003-filter-branch.sh
+6
-6
@@ -78,7 +78,7 @@ test_expect_success 'filter subdirectory only' '
78
test_expect_success 'subdirectory filter result looks okay' '
79
test 2 = $(git rev-list sub | wc -l) &&
80
git show sub:new &&
81
- ! git show sub:subdir
81
+ test_must_fail git show sub:subdir
82
'
83
84
test_expect_success 'setup and filter history that requires --full-history' '
@@ -100,7 +100,7 @@ test_expect_success 'subdirectory filter result looks okay' '
100
test 3 = $(git rev-list -1 --parents sub-master | wc -w) &&
101
git show sub-master^:new &&
102
git show sub-master^2:new &&
103
- ! git show sub:subdir
103
+ test_must_fail git show sub:subdir
104
'
105
106
test_expect_success 'use index-filter to move into a subdirectory' '
@@ -114,7 +114,7 @@ test_expect_success 'use index-filter to move into a subdirectory' '
114
115
test_expect_success 'stops when msg filter fails' '
116
old=$(git rev-parse HEAD) &&
117
- ! git-filter-branch -f --msg-filter false HEAD &&
117
+ test_must_fail git-filter-branch -f --msg-filter false HEAD &&
118
test $old = $(git rev-parse HEAD) &&
119
rm -rf .git-rewrite
120
'
@@ -151,8 +151,8 @@ test_expect_success "remove a certain author's commits" '
151
'
152
153
test_expect_success 'barf on invalid name' '
154
- ! git filter-branch -f master xy-problem &&
155
- ! git filter-branch -f HEAD^
154
+ test_must_fail git filter-branch -f master xy-problem &&
155
+ test_must_fail git filter-branch -f HEAD^
156
'
157
158
test_expect_success '"map" works in commit filter' '
@@ -174,7 +174,7 @@ test_expect_success 'Name needing quotes' '
174
git add foo &&
175
git commit -m "Adding a file" &&
176
git filter-branch --tree-filter "rm -fr foo" &&
177
- ! git ls-files --error-unmatch "foo/$name" &&
177
+ test_must_fail git ls-files --error-unmatch "foo/$name" &&
178
test $(git rev-parse --verify rerere) != $(git rev-parse --verify A)
179
180
'