diff options
author | Darren Tucker <dtucker@cvs.openbsd.org> | 2022-02-20 03:47:27 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@cvs.openbsd.org> | 2022-02-20 03:47:27 +0000 |
commit | 7ad6433af41625edb1252615d1e24a3bd205ec47 (patch) | |
tree | 133f03127abd478aa482194b32ef90e252d07b65 | |
parent | fc1fe33388f13a6a46e1df8c9c56eace0104a040 (diff) |
Aproximate realpath on the expected output by deduping leading slashes.
Fixes test failure when user's home dir is / which is possible in some
portable configurations.
-rw-r--r-- | regress/usr.bin/ssh/percent.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/regress/usr.bin/ssh/percent.sh b/regress/usr.bin/ssh/percent.sh index 339b6272282..6bc10243911 100644 --- a/regress/usr.bin/ssh/percent.sh +++ b/regress/usr.bin/ssh/percent.sh @@ -1,4 +1,4 @@ -# $OpenBSD: percent.sh,v 1.13 2021/07/25 12:13:03 dtucker Exp $ +# $OpenBSD: percent.sh,v 1.14 2022/02/20 03:47:26 dtucker Exp $ # Placed in the Public Domain. tid="percent expansions" @@ -16,7 +16,8 @@ echo "permitlocalcommand yes" >> $OBJ/ssh_proxy trial() { - opt="$1"; arg="$2"; expect="$3" + opt="$1"; arg="$2" + expect=`echo "$3" | sed 's|^//|/|'` # approximate realpath trace "test $opt=$arg $expect" rm -f $OBJ/actual |