Fix expansion tests on OS X

This commit is contained in:
ridiculousfish 2014-10-30 21:51:23 -07:00
parent 16459099af
commit a177eb8c16

View file

@ -82,7 +82,13 @@ echo ()[1]
echo ()[d]
# Test tilde expansion
set tmpdir (mktemp -d)
# On OS X, we must pass an argument to mktemp,
# and /tmp is symlinked to /private/tmp
# $PWD is our best bet for resolving it
set -l saved $PWD
cd (mktemp -d /tmp/fish_tilde_XXXXXX)
set tmpdir $PWD
cd $saved
mkdir $tmpdir/realhome
ln -s $tmpdir/realhome $tmpdir/linkhome
set expandedtilde (env HOME=$tmpdir/linkhome ../fish -c 'echo ~')