mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
8b67a1b26f
I noticed while fixing issue #2702 that the fish program being tested was sourcing config.fish files outside of the current build. This also happens when Travis CI runs the tests but isn't an issue there because of how Travis is configured to execute the tests. I also noticed that running `make test` was polluting my personal fish history; which will become a bigger problem if and when the fishd universal var file is moved from $XDG_CONFIG_HOME to $XDG_DATA_HOME. This change makes it possible for an individual to run the tests on their local machine secure in the knowledge that only the config.fish and related files from their git repository will be used and doing so won't pollute their personal fish history. Resolves #469
37 lines
754 B
Fish
37 lines
754 B
Fish
|
|
set smurf green
|
|
|
|
switch $smurf;
|
|
case "*ee*"
|
|
echo Test 1 pass
|
|
case "*"
|
|
echo Test 1 fail
|
|
end;
|
|
|
|
switch $smurf
|
|
case *ee*
|
|
echo Test 2 fail
|
|
case red green blue
|
|
echo Test 2 pass
|
|
case "*"
|
|
echo Test 2 fail
|
|
end
|
|
|
|
switch $smurf
|
|
case cyan magenta yellow
|
|
echo Test 3 fail
|
|
case "?????"
|
|
echo Test 3 pass
|
|
end
|
|
|
|
# Verify that we can do wildcard expansion when we
|
|
# don't have read access to some path components
|
|
# See #2099
|
|
set -l where ../test/temp/fish_wildcard_permissions_test/noaccess/yesaccess
|
|
mkdir -p $where
|
|
chmod 300 (dirname $where) # no read permissions
|
|
mkdir -p $where
|
|
touch $where/alpha.txt $where/beta.txt $where/delta.txt
|
|
echo $where/*
|
|
chmod 700 (dirname $where) # so we can delete it
|
|
rm -rf ../test/temp/fish_wildcard_permissions_test
|