From 94ca95bd6f44f4ac4c416f870890578367aaa483 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Wed, 22 Dec 1999 22:00:32 +0000 Subject: zsh-workers/9137 --- Test/07cond.ztst | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'Test') diff --git a/Test/07cond.ztst b/Test/07cond.ztst index 7fff51ce2..e86d9139b 100644 --- a/Test/07cond.ztst +++ b/Test/07cond.ztst @@ -13,7 +13,7 @@ touch zerolength print 'Garbuglio' >nonzerolength - touch modish + mkdir modish chmod g+s modish chmod u+s modish chmod +t modish @@ -26,7 +26,11 @@ 0:-a cond # Find a block special file system. This is a little tricky. - block=$(df / | tail -1 | awk '{ print $1 }') && + block=$(df / | awk ' + $NF == "/" {print $1} + $1 == "/" && substr($2,0,1) == "(" { + if((l = index($2,")") - 2) < 0) l = length($2) - 1; + print substr($2,2,l)}') && [[ -b $block && ! -b zerolength ]] 0:-b cond @@ -61,7 +65,11 @@ [[ -o rcs && ! -o norcs && -o noerrexit && ! -o errexit ]] 0:-o cond - mknod pipe p + if whence mkfifo >/dev/null; then + mkfifo pipe + else + mknod pipe p + fi [[ -p pipe && ! -p zerolength ]] 0:-p cond -- cgit 1.4.1