logo

utils-std

Collection of commonly available Unix tools
commit: 4cc3fb4141ed19f0502385cfecd4047c86ca3bd3
parent 1c3dd788976cf121edb230bb1db7a3147b0f923d
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Wed, 31 Jul 2024 03:05:05 +0200

test-cmd/mktemp.sh: Fix removal with trimming newline from $out

Diffstat:

Mtest-cmd/mktemp.sh6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/test-cmd/mktemp.sh b/test-cmd/mktemp.sh @@ -18,7 +18,8 @@ t_mktemp() test -f "$out" test_ret="$?" - rm -f "$out" + rm -f "${out% +}" if [ "$ret" != 0 ] && [ "$test_ret" != 0 ]; then printf 'not ok %d - %s\n' "$count" "$1" @@ -43,7 +44,8 @@ t_mkdtemp() test -d "$out" test_ret="$?" - rm -fr "$out" + rm -fr "${out% +}" if [ "$ret" != 0 ] && [ "$test_ret" != 0 ]; then printf 'not ok %d - %s\n' "$count" "$1"