Skip to content

Commit

Permalink
Fix shellcheck lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Ericson2314 committed Aug 4, 2024
1 parent a36c52d commit 6439b49
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/functional/common/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ expect() {
shift
"$@" && res=0 || res="$?"
# also match "negative" codes, which wrap around to >127
if [[ $res -ne $expected && $res -ne $[256 + expected] ]]; then
if [[ $res -ne $expected && $res -ne $((256 + expected)) ]]; then
echo "Expected exit code '$expected' but got '$res' from command ${*@Q}" >&2
return 1
fi
Expand All @@ -199,7 +199,7 @@ expectStderr() {
shift
"$@" 2>&1 && res=0 || res="$?"
# also match "negative" codes, which wrap around to >127
if [[ $res -ne $expected && $res -ne $[256 + expected] ]]; then
if [[ $res -ne $expected && $res -ne $((256 + expected)) ]]; then
echo "Expected exit code '$expected' but got '$res' from command ${*@Q}" >&2
return 1
fi
Expand Down Expand Up @@ -287,7 +287,7 @@ checkGrepArgs() {
for arg in "$@"; do
if [[ "$arg" != "${arg//$'\n'/_}" ]]; then
echo "$(callerPrefix)newline not allowed in arguments; grep would try each line individually as if connected by an OR operator" >&2
return -101
return 155 # = -101 mod 256
fi
done
}
Expand Down

0 comments on commit 6439b49

Please sign in to comment.