forked from lix-project/lix
Merge pull request #8661 from hercules-ci/test-reformat-error-message
tests: Reformat exit code error message
This commit is contained in:
commit
dd9f816b29
1 changed files with 2 additions and 2 deletions
|
@ -195,7 +195,7 @@ expect() {
|
||||||
shift
|
shift
|
||||||
"$@" && res=0 || res="$?"
|
"$@" && res=0 || res="$?"
|
||||||
if [[ $res -ne $expected ]]; then
|
if [[ $res -ne $expected ]]; then
|
||||||
echo "Expected '$expected' but got '$res' while running '${*@Q}'" >&2
|
echo "Expected exit code '$expected' but got '$res' from command ${*@Q}" >&2
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
|
@ -209,7 +209,7 @@ expectStderr() {
|
||||||
shift
|
shift
|
||||||
"$@" 2>&1 && res=0 || res="$?"
|
"$@" 2>&1 && res=0 || res="$?"
|
||||||
if [[ $res -ne $expected ]]; then
|
if [[ $res -ne $expected ]]; then
|
||||||
echo "Expected '$expected' but got '$res' while running '${*@Q}'" >&2
|
echo "Expected exit code '$expected' but got '$res' from command ${*@Q}" >&2
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
|
|
Loading…
Reference in a new issue