From 91edfa3b258cfd90854eb50e1a2ad74fe95043ed Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 17 Apr 2002 17:17:42 +0000 Subject: Alexandre Duret-Lutz: 16930: Src/cond.c, Test/C02cond.ztst: Careful with long filenames in internal condition test; fix block file test for `-f'. --- Test/C02cond.ztst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Test/C02cond.ztst') diff --git a/Test/C02cond.ztst b/Test/C02cond.ztst index eafda1b5c..6c6aea4f6 100644 --- a/Test/C02cond.ztst +++ b/Test/C02cond.ztst @@ -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 ]] -- cgit 1.4.1