wildmatch test: use test_must_fail, not ! for test-wildmatch
Use of ! should be reserved for non-git programs that are assumed not to fail, see README. With this change only t/t0110-urlmatch-normalization.sh is still using this anti-pattern. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ævar Arnfjörð Bjarmason committed
Jan 30, 2018 at 21:21 UTC
4bc280f25098c60c7e6eef4b0277a94925ed4c11
1 file changed
+3
-3
t/t3070-wildmatch.sh
+3
-3
@@ -13,7 +13,7 @@ match() {
13
elif test "$1" = 0
14
then
15
test_expect_success "wildmatch: no match '$2' '$3'" "
16
- ! test-wildmatch wildmatch '$2' '$3'
16
+ test_must_fail test-wildmatch wildmatch '$2' '$3'
17
"
18
else
19
test_expect_success "PANIC: Test framework error. Unknown matches value $1" 'false'
@@ -29,7 +29,7 @@ imatch() {
29
elif test "$1" = 0
30
then
31
test_expect_success "iwildmatch: no match '$2' '$3'" "
32
- ! test-wildmatch iwildmatch '$2' '$3'
32
+ test_must_fail test-wildmatch iwildmatch '$2' '$3'
33
"
34
else
35
test_expect_success "PANIC: Test framework error. Unknown matches value $1" 'false'
@@ -45,7 +45,7 @@ pathmatch() {
45
elif test "$1" = 0
46
then
47
test_expect_success "pathmatch: no match '$2' '$3'" "
48
- ! test-wildmatch pathmatch '$2' '$3'
48
+ test_must_fail test-wildmatch pathmatch '$2' '$3'
49
"
50
else
51
test_expect_success "PANIC: Test framework error. Unknown matches value $1" 'false'