From d88be7b5c884b594595197e0ffe6f0eb4fba363e Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Thu, 3 Jan 2019 23:17:20 +0100 Subject: [PATCH] tests/cd: cd back before cleaning up Otherwise this'd run afoul of OpenIndiana's "no removing $PWD" rule. Spoilsports! See #5472. --- tests/cd.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/cd.in b/tests/cd.in index 21104a432..fa3964a22 100644 --- a/tests/cd.in +++ b/tests/cd.in @@ -1,3 +1,5 @@ +# Store pwd to later go back before cleaning up +set -l oldpwd (pwd) logmsg cd symlink non-resolution set real (mktemp -d) set link (mktemp -u) @@ -35,4 +37,7 @@ echo "ls:" complete -C'ls ../' echo "cd:" complete -C'cd ../' + +# cd back before removing the test directory again. +cd $oldpwd rm -Rf $base