2005-09-20 21:31:55 +08:00
|
|
|
|
|
|
|
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
|
2015-06-21 03:26:03 +08:00
|
|
|
|
|
|
|
# Verify that we can do wildcard expansion when we
|
|
|
|
# don't have read access to some path components
|
|
|
|
# See #2099
|
2016-02-07 10:08:22 +08:00
|
|
|
set -l where ../test/temp/fish_wildcard_permissions_test/noaccess/yesaccess
|
2015-06-21 03:26:03 +08:00
|
|
|
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
|
2016-02-07 10:08:22 +08:00
|
|
|
rm -rf ../test/temp/fish_wildcard_permissions_test
|