Skip to content

Commit

Permalink
Merge pull request #8661 from hercules-ci/test-reformat-error-message
Browse files Browse the repository at this point in the history
tests: Reformat exit code error message
  • Loading branch information
Ericson2314 committed Aug 25, 2023
2 parents cbd8956 + 3b3822e commit dd9f816
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/common/vars-and-functions.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit dd9f816

Please sign in to comment.