Skip to content

Commit

Permalink
test: fix message passing in checker function
Browse files Browse the repository at this point in the history
Signed-off-by: Joachim Wiberg <[email protected]>
  • Loading branch information
troglobit committed Dec 29, 2024
1 parent b37222a commit d22e422
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/unicode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if [ -z "${srcdir}" ]; then
fi
. "${srcdir}/lib.sh"

MSG="öäüÖÄÜ߀¢§"
MSG1="öäüÖÄÜ߀¢§"
MSG2="…‘’•"

setup_unicode()
Expand All @@ -16,13 +16,13 @@ setup_unicode()

check_log_message()
{
message="${!#}" # Get last argument
[ $# -gt 1 ] && altsock="$1"
[ $# -gt 1 ] && altsock="$1" && shift
message="$1"

logger "${altsock}" "$message"
grep "$message" "$LOG"
}

run_step "Set up unicode capable syslogd" setup_unicode
run_step "Verify logger" check_log_message "$MSG"
run_step "Verify logger" check_log_message "$MSG1"
run_step "Verify logger w/ alt. socket" check_log_message "$ALTSOCK" "$MSG2"

0 comments on commit d22e422

Please sign in to comment.