From 2ecaa071856fe713195be416466c2441ecff226e Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 11 Mar 2004 19:14:38 +0000 Subject: 19603: Gracefully omit Y tests if zpty is not available --- Test/Y03arguments.ztst | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'Test/Y03arguments.ztst') diff --git a/Test/Y03arguments.ztst b/Test/Y03arguments.ztst index a62e34a7e..bfdcdec63 100644 --- a/Test/Y03arguments.ztst +++ b/Test/Y03arguments.ztst @@ -1,16 +1,18 @@ # Tests for _arguments. %prep - . $ZTST_srcdir/comptest - - mkdir comp.tmp - cd comp.tmp - - comptestinit -z $ZTST_testdir/../Src/zsh && - { - comptesteval 'compdef _tst tst' - tst_arguments () { comptesteval "_tst () { _arguments ${${(@qq)*}} }" } - } + if ( zmodload -i zsh/zpty ) >/dev/null 2>&1; then + . $ZTST_srcdir/comptest + mkdir comp.tmp + cd comp.tmp + comptestinit -z $ZTST_testdir/../Src/zsh && + { + comptesteval 'compdef _tst tst' + tst_arguments () { comptesteval "_tst () { _arguments ${${(@qq)*}} }" } + } + else + ZTST_unimplemented="the zsh/zpty module is not available" + fi %test tst_arguments ':desc1:(arg1)' -- cgit 1.4.1