1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-22 16:20:23 +02:00

Alexandre Duret-Lutz: 16930: Src/cond.c, Test/C02cond.ztst:

Careful with long filenames in internal condition test; fix block
file test for `-f'.
This commit is contained in:
Peter Stephenson 2002-04-17 17:17:42 +00:00
parent 6652004b53
commit 91edfa3b25
3 changed files with 17 additions and 2 deletions

View file

@ -52,7 +52,12 @@
[[ -e zerolength && ! -e nonexistent ]]
0:-e cond
[[ -f zerolength && ! -f cond && ! -f $char && ! -f $block && ! -f . ]]
if [[ -n $block ]]; then
[[ -f zerolength && ! -f cond && ! -f $char && ! -f $block[(f)1] && ! -f . ]]
else
print -u8 'Warning: Not testing [[ -f blockdevice ]] (no devices found)'
[[ -f zerolength && ! -f cond && ! -f $char && ! -f . ]]
fi
0:-f cond
[[ -g modish && ! -g zerolength ]]