mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-20 04:13:07 +02:00
bash_tap: Implement mechanism to mark a test as expected failure
Test author can now mark a bash tap test as expected failure by setting EXPFAIL environment variable to a non-zero value.
This commit is contained in:
parent
a5eee5fcc6
commit
5317f7c795
1 changed files with 8 additions and 1 deletions
|
@ -7,7 +7,14 @@ function bashtap_on_error {
|
||||||
# A command in the parent script failed, interpret this as a test failure.
|
# A command in the parent script failed, interpret this as a test failure.
|
||||||
# $bashtap_line contains the last executed line, or an error.
|
# $bashtap_line contains the last executed line, or an error.
|
||||||
echo -n "$bashtap_output"
|
echo -n "$bashtap_output"
|
||||||
echo "not ok 1 - ${bashtap_line}"
|
|
||||||
|
# Determine if this failure was expected
|
||||||
|
if [[ ! -z "$EXPFAIL" ]]
|
||||||
|
then
|
||||||
|
todo_suffix=" # TODO"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "not ok 1 - ${bashtap_line}${todo_suffix}"
|
||||||
bashtap_clean_tmpdir
|
bashtap_clean_tmpdir
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue