tests: Don't rely on $HOME existing

Apparently the launchpad tests run with $HOME set to a nonexistent
directory. Since we just want *out*, let's just store the previous dir
and go back.
This commit is contained in:
Fabian Homborg 2020-12-29 12:48:11 +01:00
parent 43505f7077
commit 4c09012b0d

View file

@ -1,5 +1,6 @@
# RUN: %fish %s # RUN: %fish %s
set -l oldpwd $PWD
cd (mktemp -d) cd (mktemp -d)
set tmpdir (pwd -P) set tmpdir (pwd -P)
@ -85,5 +86,5 @@ string join \n **/bar | sort
# CHECK: foo/bar # CHECK: foo/bar
# Clean up. # Clean up.
cd $HOME cd $oldpwd
rm -Rf $tmpdir rm -Rf $tmpdir