mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-27 14:45:13 +08:00
Fix expansion tests on OS X
This commit is contained in:
parent
16459099af
commit
a177eb8c16
@ -82,7 +82,13 @@ echo ()[1]
|
|||||||
echo ()[d]
|
echo ()[d]
|
||||||
|
|
||||||
# Test tilde expansion
|
# 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
|
mkdir $tmpdir/realhome
|
||||||
ln -s $tmpdir/realhome $tmpdir/linkhome
|
ln -s $tmpdir/realhome $tmpdir/linkhome
|
||||||
set expandedtilde (env HOME=$tmpdir/linkhome ../fish -c 'echo ~')
|
set expandedtilde (env HOME=$tmpdir/linkhome ../fish -c 'echo ~')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user