mirror of
https://github.com/samba-team/samba.git
synced 2025-01-03 01:18:10 +03:00
ctdb-tests: Strip trailing newlines from expected result output
This allows the provided output to be specified a little more carelessly. As per the comment, trailing newlines can't be matched anyway, so this is notionally a bug fix. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
5fa0c86b61
commit
c413838f79
@ -19,7 +19,12 @@ required_result()
|
||||
if [ "$2" = "--" ]; then
|
||||
required_output=""
|
||||
else
|
||||
required_output="$2"
|
||||
# Use a sub-shell to strip trailing newlines.
|
||||
# They can't be matched anyway because the
|
||||
# test is run in a sub-shell, which strips
|
||||
# trailing newlines.
|
||||
# shellcheck disable=SC2116
|
||||
required_output=$(echo "$2")
|
||||
fi
|
||||
else
|
||||
if ! tty -s; then
|
||||
|
Loading…
Reference in New Issue
Block a user