fish-shell/tests/checks/wildcard.fish
Fabian Homborg 9cbd3d57a0 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
See 1ee57e9244
Fixes #6555
Fixes #6558
2020-01-30 17:34:48 +01:00

17 lines
319 B
Fish

# RUN: %fish %s
# 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
mkdir b
touch ./b/file.txt
set dirs ./a ./b
echo $dirs/*.txt
# CHECK: ./b/file.txt
cd $oldpwd
rm -Rf $dir