about summary refs log tree commit diff
path: root/Test/Y03arguments.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2004-03-11 19:14:38 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2004-03-11 19:14:38 +0000
commit2ecaa071856fe713195be416466c2441ecff226e (patch)
treecf258ce0cb53d0c169602cce037ddd24c70c5060 /Test/Y03arguments.ztst
parentd351673349fbfd2f8365ba3d8f5919370a10df63 (diff)
downloadzsh-2ecaa071856fe713195be416466c2441ecff226e.tar.gz
zsh-2ecaa071856fe713195be416466c2441ecff226e.tar.xz
zsh-2ecaa071856fe713195be416466c2441ecff226e.zip
19603: Gracefully omit Y tests if zpty is not available
Diffstat (limited to 'Test/Y03arguments.ztst')
-rw-r--r--Test/Y03arguments.ztst22
1 files changed, 12 insertions, 10 deletions
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)'