]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: Aproximate realpath on the expected output by deduping
authordtucker@openbsd.org <dtucker@openbsd.org>
Sun, 20 Feb 2022 03:47:26 +0000 (03:47 +0000)
committerDarren Tucker <dtucker@dtucker.net>
Sun, 20 Feb 2022 04:10:19 +0000 (15:10 +1100)
leading slashes. Fixes test failure when user's home dir is / which is
possible in some portable configurations.

OpenBSD-Regress-ID: 53b8c53734f8893806961475c7106397f98d9f63

regress/percent.sh

index 7ed41845b5cfe1e6841daf3cd05dd84f3756009b..bb81779a013db27652f23ead7831a7cce17c7a8f 100644 (file)
@@ -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"
@@ -21,7 +21,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