diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2002-04-17 17:17:17 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2002-04-17 17:17:17 +0000 |
commit | 377938212a3a4a5e78b466d57b1b7e2233ebe231 (patch) | |
tree | f47acbaad7c25aeb283e1b394a3391b5bc2cc3a4 /Test/C02cond.ztst | |
parent | d7c53a6a3a17470a0b283983eb730dbc393a7be5 (diff) | |
download | zsh-377938212a3a4a5e78b466d57b1b7e2233ebe231.tar.gz zsh-377938212a3a4a5e78b466d57b1b7e2233ebe231.tar.xz zsh-377938212a3a4a5e78b466d57b1b7e2233ebe231.zip |
Alexandre Duret-Lutz: 16930: Src/cond.c, Test/C02cond.ztst:
Careful with long filenames in internal condition test; fix block file test for `-f'.
Diffstat (limited to 'Test/C02cond.ztst')
-rw-r--r-- | Test/C02cond.ztst | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Test/C02cond.ztst b/Test/C02cond.ztst index b320634d5..14c54d842 100644 --- a/Test/C02cond.ztst +++ b/Test/C02cond.ztst @@ -51,7 +51,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 ]] |