logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git
commit: 38714b356c66455460b5c7224d926570215ebe63
parent 70f025f366b47964791b4377c7f1be9eeee2f9da
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu, 21 Nov 2024 09:52:00 +0100

test-cmd/pwd.sh: fix for variable assignment in (l)oksh

Diffstat:

Mtest-cmd/pwd.sh10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/test-cmd/pwd.sh b/test-cmd/pwd.sh @@ -14,15 +14,19 @@ t --exit=1 usage '-H' "pwd: error: Unrecognised option '-H' Usage: pwd [-L|-P] " -PWD=foo t PWD=foo '' "${PWD?} +oldpwd=$PWD + +PWD=/$PWD t 'PWD=/$PWD' '' "/${oldpwd} " -PWD=/$PWD t 'PWD=/$PWD' '' "/${PWD?} +PWD=//foo t 'PWD=//foo' '' "${oldpwd} " -PWD=//foo t 'PWD=//foo' '' "${PWD?} +PWD=foo t PWD=foo '' "${oldpwd} " +PWD=$oldpwd + if command -v mktemp >/dev/null 2>/dev/null then tmpdir="$(mktemp -d)" || exit 1