aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2023-07-07 15:08:25 +0200
committerRobert Hensing <robert@roberthensing.nl>2023-07-07 15:08:25 +0200
commit3b3822ea1ddf34f8fcb44c67cda2b778b5b41a34 (patch)
treeb8010cdf10faa55cd954fc2692df64e6877abb3e /tests
parent6db66ebfc55769edd0c6bc70fcbd76246d4d26e0 (diff)
tests: Reformat exit code error message
Now looks like: Expected exit code '123' but got '0' from command 'echo' 'hi'
Diffstat (limited to 'tests')
-rw-r--r--tests/common/vars-and-functions.sh.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/common/vars-and-functions.sh.in b/tests/common/vars-and-functions.sh.in
index a9e6c802f..33a764c3f 100644
--- a/tests/common/vars-and-functions.sh.in
+++ b/tests/common/vars-and-functions.sh.in
@@ -195,7 +195,7 @@ expect() {
shift
"$@" && res=0 || res="$?"
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
fi
return 0
@@ -209,7 +209,7 @@ expectStderr() {
shift
"$@" 2>&1 && res=0 || res="$?"
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
fi
return 0