mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Fix expansion tests on OS X
This commit is contained in:
parent
16459099af
commit
a177eb8c16
1 changed files with 7 additions and 1 deletions
|
@ -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 ~')
|
||||
|
|
Loading…
Reference in a new issue