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>
This commit is contained in:
parent
e121b4b822
commit
14c14b44e4
@ -174,6 +174,7 @@ process_diffs () {
|
|||||||
V=$(git version | sed -e 's/^git version //' -e 's/\./\\./g')
|
V=$(git version | sed -e 's/^git version //' -e 's/\./\\./g')
|
||||||
while read magic cmd
|
while read magic cmd
|
||||||
do
|
do
|
||||||
|
status=success
|
||||||
case "$magic" in
|
case "$magic" in
|
||||||
'' | '#'*)
|
'' | '#'*)
|
||||||
continue ;;
|
continue ;;
|
||||||
@ -182,6 +183,10 @@ do
|
|||||||
label="$magic-$cmd"
|
label="$magic-$cmd"
|
||||||
case "$magic" in
|
case "$magic" in
|
||||||
noellipses) ;;
|
noellipses) ;;
|
||||||
|
failure)
|
||||||
|
status=failure
|
||||||
|
magic=
|
||||||
|
label="$cmd" ;;
|
||||||
*)
|
*)
|
||||||
BUG "unknown magic $magic" ;;
|
BUG "unknown magic $magic" ;;
|
||||||
esac ;;
|
esac ;;
|
||||||
@ -194,7 +199,7 @@ do
|
|||||||
expect="$TEST_DIRECTORY/t4013/diff.$test"
|
expect="$TEST_DIRECTORY/t4013/diff.$test"
|
||||||
actual="$pfx-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"
|
echo "$ git $cmd"
|
||||||
case "$magic" in
|
case "$magic" in
|
||||||
|
Loading…
Reference in New Issue
Block a user