mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 14:03:58 +00:00
Tests: Don't remove a parent of $PWD
Solaris/OpenIndiana/Illumos `rm` checks that and errors out. In these cases we don't actually need it to be a part of $PWD as it's just for cleanup, so we `cd` out before. See #5472 See1ee57e9244
Fixes #6555 Fixes #6558 (cherry picked from commit9cbd3d57a0
)
This commit is contained in:
parent
b313ba555a
commit
105a256e5a
2 changed files with 3 additions and 1 deletions
|
@ -19,8 +19,8 @@ begin
|
||||||
cd x
|
cd x
|
||||||
pwd
|
pwd
|
||||||
end
|
end
|
||||||
rm -rf $tmp
|
|
||||||
cd $oldpwd
|
cd $oldpwd
|
||||||
|
rm -rf $tmp
|
||||||
|
|
||||||
# Create a test directory to store our stuff.
|
# Create a test directory to store our stuff.
|
||||||
set -l base /tmp/cdcomp_test
|
set -l base /tmp/cdcomp_test
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
# Ensure that, if variable expansion results in multiple strings
|
# Ensure that, if variable expansion results in multiple strings
|
||||||
# and one of them fails a glob, that we don't fail the entire expansion.
|
# and one of them fails a glob, that we don't fail the entire expansion.
|
||||||
|
set -l oldpwd (pwd)
|
||||||
set dir (mktemp -d)
|
set dir (mktemp -d)
|
||||||
cd $dir
|
cd $dir
|
||||||
mkdir a
|
mkdir a
|
||||||
|
@ -12,4 +13,5 @@ set dirs ./a ./b
|
||||||
echo $dirs/*.txt
|
echo $dirs/*.txt
|
||||||
# CHECK: ./b/file.txt
|
# CHECK: ./b/file.txt
|
||||||
|
|
||||||
|
cd $oldpwd
|
||||||
rm -Rf $dir
|
rm -Rf $dir
|
||||||
|
|
Loading…
Reference in a new issue