Skip to content

Commit

Permalink
Tests: Don't remove a parent of $PWD
Browse files Browse the repository at this point in the history
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
See 1ee57e9
Fixes #6555
Fixes #6558

(cherry picked from commit 9cbd3d5)
  • Loading branch information
faho committed Jan 30, 2020
1 parent b313ba5 commit 105a256
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/checks/cd.fish
Expand Up @@ -19,8 +19,8 @@ begin
cd x
pwd
end
rm -rf $tmp
cd $oldpwd
rm -rf $tmp

# Create a test directory to store our stuff.
set -l base /tmp/cdcomp_test
Expand Down
2 changes: 2 additions & 0 deletions tests/checks/wildcard.fish
Expand Up @@ -2,6 +2,7 @@

# Ensure that, if variable expansion results in multiple strings
# and one of them fails a glob, that we don't fail the entire expansion.
set -l oldpwd (pwd)
set dir (mktemp -d)
cd $dir
mkdir a
Expand All @@ -12,4 +13,5 @@ set dirs ./a ./b
echo $dirs/*.txt
# CHECK: ./b/file.txt

cd $oldpwd
rm -Rf $dir

0 comments on commit 105a256

Please sign in to comment.