Shell: Tweak tests to use 'echo -n' when newlines are significant

This commit is contained in:
AnotherTest 2020-07-29 04:15:33 +04:30 committed by Andreas Kling
parent 6df2f8a8cb
commit 07ea2b672b

View file

@ -85,7 +85,7 @@ rm -fr sh-test
# Setopt
setopt --inline_exec_keep_empty_segments
test "$(echo "a\n\nb")" = "a b" || fail inline_exec_keep_empty_segments has no effect
test "$(echo -n "a\n\nb")" = "a b" || fail inline_exec_keep_empty_segments has no effect
setopt --no_inline_exec_keep_empty_segments
test "$(echo "a\n\nb")" = "a b" || fail cannot unset inline_exec_keep_empty_segments
test "$(echo -n "a\n\nb")" = "a b" || fail cannot unset inline_exec_keep_empty_segments