tests/cd: cd back before cleaning up

Otherwise this'd run afoul of OpenIndiana's "no removing $PWD" rule. Spoilsports!

See #5472.
This commit is contained in:
Fabian Homborg
2019-01-03 23:17:20 +01:00
committed by ridiculousfish
parent 1b551e553b
commit d88be7b5c8

View File

@@ -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