diff options
author | Sergey Organov <sorganov@gmail.com> | 2020-12-21 18:19:43 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-12-22 00:47:31 +0300 |
commit | 14c14b44e47bc8c420e5161abc8fe283121f3e31 (patch) | |
tree | a95119214da3823d322121486faebdd3fdd1b63a /t/t4013-diff-various.sh | |
parent | e121b4b822765336cd4710ec9f8aed77d25de3fe (diff) |
t4013: support test_expect_failure through ':failure' magic
Add support to be able to specify expected failure, through :failure
magic, like this:
:failure cmd args
Signed-off-by: Sergey Organov <sorganov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013-diff-various.sh')
-rwxr-xr-x | t/t4013-diff-various.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh index 5c7b0122b4..935d10ac05 100755 --- a/t/t4013-diff-various.sh +++ b/t/t4013-diff-various.sh @@ -174,6 +174,7 @@ process_diffs () { V=$(git version | sed -e 's/^git version //' -e 's/\./\\./g') while read magic cmd do + status=success case "$magic" in '' | '#'*) continue ;; @@ -182,6 +183,10 @@ do label="$magic-$cmd" case "$magic" in noellipses) ;; + failure) + status=failure + magic= + label="$cmd" ;; *) BUG "unknown magic $magic" ;; esac ;; @@ -194,7 +199,7 @@ do expect="$TEST_DIRECTORY/t4013/diff.$test" actual="$pfx-diff.$test" - test_expect_success "git $cmd # magic is ${magic:-(not used)}" ' + test_expect_$status "git $cmd # magic is ${magic:-(not used)}" ' { echo "$ git $cmd" case "$magic" in |