Skip to content

Commit

Permalink
fix warning unit test. Attempt to satisfy shfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ReDTerraN committed Apr 24, 2023
1 parent d4762fa commit 653cd74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions bin/xpanes
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ xpns_log() {
local _loglevel="info"
local debugoutput=""
if [[ "$#" -gt 1 ]]; then
#we ignore the return value of this command, hence disabling shell check
#shellcheck disable=SC2155
# we ignore the return value of this command, hence disabling shell check
# shellcheck disable=SC2155
local _specifiedloglevel=$(echo "$1" | tr '[:upper:]' '[:lower:]')
case ${_specifiedloglevel} in
info | warning | error)
Expand All @@ -146,7 +146,6 @@ xpns_log() {
if [[ $XP_OPT_DEBUG -eq 1 ]]; then
debugoutput=$(date "+:%F_%T"):${FUNCNAME[1]}
loglevel=${_specifiedloglevel}

else
return
fi
Expand Down
2 changes: 1 addition & 1 deletion test/unit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ assertEquals "$expected" "$actual"
xpns_log "warning" "This is a warning message" > "$tmpfile" 2>&1
local actual=$(cat "$tmpfile")
rm "$tmpfile"
expected="[unit.sh:warning]: This is a warning message "
expected="[unit.sh:warning] This is a warning message "
assertEquals "$expected" "$actual"

xpns_log "error" "This is an error message" > "$tmpfile" 2>&1
Expand Down

0 comments on commit 653cd74

Please sign in to comment.