mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-03-10 22:43:54 +00:00
Improve test framework: log message from assertStdoutIs
This commit is contained in:
parent
3e0f8df18a
commit
10fd1c1fc6
@ -921,7 +921,7 @@ _tfw_assert_stdxxx_is() {
|
||||
'') ln -f "$_tfw_tmp/$qual" "$_tfw_tmp/content";;
|
||||
*) sed -n -e "${_tfw_opt_line}p" "$_tfw_tmp/$qual" >"$_tfw_tmp/content";;
|
||||
esac
|
||||
local message="${_tfw_message:-${_tfw_opt_line:+line $_tfw_opt_line of }$qual of ($executed) is $*}"
|
||||
local message="${_tfw_message:-${_tfw_opt_line:+line $_tfw_opt_line of }$qual of ($executed) is $(_tfw_shellarg "$@")}"
|
||||
echo -n "$@" >$_tfw_tmp/stdxxx_is.tmp
|
||||
if ! cmp --quiet $_tfw_tmp/stdxxx_is.tmp "$_tfw_tmp/content"; then
|
||||
_tfw_failmsg "assertion failed: $message"
|
||||
|
Loading…
x
Reference in New Issue
Block a user