mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-02-20 09:26:37 +00:00
Improve test framework
In the assert() function, if --message option is given, append the details of the failed command to the message.
This commit is contained in:
parent
bc6396ec28
commit
988250a576
@ -1608,7 +1608,7 @@ end_fixture() {
|
||||
assert() {
|
||||
_tfw_getopts assert "$@"
|
||||
shift $_tfw_getopts_shift
|
||||
[ -z "$_tfw_message" ] && _tfw_message=$(shellarg "$@")
|
||||
_tfw_message="${_tfw_message:+$_tfw_message }("$@")"
|
||||
_tfw_assert "$@" || _tfw_failexit || return $?
|
||||
$_tfw_assert_noise && tfw_log "# assert $_tfw_message"
|
||||
return 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user