about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
Diffstat (limited to 'Test')
-rw-r--r--Test/A02alias.ztst2
-rw-r--r--Test/Y01completion.ztst5
-rw-r--r--Test/Y02compmatch.ztst12
-rw-r--r--Test/Y03arguments.ztst4
-rw-r--r--Test/comptest2
5 files changed, 13 insertions, 12 deletions
diff --git a/Test/A02alias.ztst b/Test/A02alias.ztst
index 03c0a6cc1..74d454a8c 100644
--- a/Test/A02alias.ztst
+++ b/Test/A02alias.ztst
@@ -15,7 +15,7 @@
 >echo
 
   \foo foo
-1:Not aliasing
+127:Not aliasing
 ?ZTST_execchunk:2: command not found: foo
 
   \bar \bar
diff --git a/Test/Y01completion.ztst b/Test/Y01completion.ztst
index bf80b6614..0dfb6c074 100644
--- a/Test/Y01completion.ztst
+++ b/Test/Y01completion.ztst
@@ -6,12 +6,13 @@
   mkdir comp.tmp
   cd comp.tmp
 
-  comptestinit -z $ZTST_testdir/../Src/zsh
-
+  comptestinit -z $ZTST_testdir/../Src/zsh &&
+  {
   mkdir dir1
   mkdir dir2
   touch file1
   touch file2
+  }
 
 %test
 
diff --git a/Test/Y02compmatch.ztst b/Test/Y02compmatch.ztst
index f726923e8..4d4e0c0fa 100644
--- a/Test/Y02compmatch.ztst
+++ b/Test/Y02compmatch.ztst
@@ -16,10 +16,10 @@
   mkdir match.tmp
   cd match.tmp
 
-  comptestinit -z $ZTST_testdir/../Src/zsh
-
-  list1=(IndianRed IndianRed2 IndianRed3 IndianRed4)
-  test_code () {
+  comptestinit -z $ZTST_testdir/../Src/zsh &&
+  {
+    list1=(IndianRed IndianRed2 IndianRed3 IndianRed4)
+    test_code () {
 	matcher=$1;
 	list=$2;
 	code="compdef _tst tst ; _tst () { echo -n '<COMPADD>';compadd -M '"
@@ -31,12 +31,10 @@
         code="$code; echo -n '</INSERT_POSITIONS>'"
         code="$code}"
 	comptesteval "$code"
+    }
   }
 
 
-
-	 
-
 %test
 
  test_code z: list1
diff --git a/Test/Y03arguments.ztst b/Test/Y03arguments.ztst
index 26c6db266..634b8b083 100644
--- a/Test/Y03arguments.ztst
+++ b/Test/Y03arguments.ztst
@@ -6,9 +6,11 @@
   mkdir comp.tmp
   cd comp.tmp
 
-  comptestinit -z $ZTST_testdir/../Src/zsh
+  comptestinit -z $ZTST_testdir/../Src/zsh &&
+  {
   comptesteval 'compdef _tst tst'
   tst_arguments () { comptesteval "_tst () { _arguments ${${(@qq)*}} }" }
+  }
 
 %test
  tst_arguments ':desc1:(arg1)'
diff --git a/Test/comptest b/Test/comptest
index d65ea351a..4ea738d8a 100644
--- a/Test/comptest
+++ b/Test/comptest
@@ -5,7 +5,7 @@ comptestinit () {
           $ZTST_srcdir/../Completion
           $ZTST_srcdir/../Completion/*/*~*/CVS(/) )
 
-  zmodload -i zsh/zpty
+  zmodload -i zsh/zpty || return $?
 
   comptest_zsh=${ZSH:-zsh}