zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: fix X05 to not produce errors when zpty is missing
@ 2024-09-14  0:02 Oliver Kiddle
  0 siblings, 0 replies; only message in thread
From: Oliver Kiddle @ 2024-09-14  0:02 UTC (permalink / raw)
  To: Zsh workers

The relatively new X05 test does some of it's preparation work even in
the case where zpty is not available resulting in a Command not found
error.

Oliver

diff --git a/Test/X05zleincarg.ztst b/Test/X05zleincarg.ztst
index cd9817c82..f712e9426 100644
--- a/Test/X05zleincarg.ztst
+++ b/Test/X05zleincarg.ztst
@@ -5,29 +5,29 @@
   if ( zmodload zsh/zpty 2>/dev/null ); then
     . $ZTST_srcdir/comptest
     comptestinit -v -z $ZTST_testdir/../Src/zsh
+    zpty_run '
+      autoload -Uz incarg
+      for name in {,vim-,vim-backward-}{,sync-}{inc,dec}arg; do
+        zle -N "$name" incarg
+      done
+      bindkey -v "^N" incarg
+      bindkey -v "^P" decarg
+      bindkey -v "^F" sync-incarg
+      bindkey -v "^B" sync-decarg
+      bindkey -a "^N" vim-incarg
+      bindkey -a "^P" vim-decarg
+      bindkey -a "^F" vim-sync-incarg
+      bindkey -a "^B" vim-sync-decarg
+      bindkey -a "^E" vim-backward-incarg
+      bindkey -a "^Y" vim-backward-decarg
+      unset TMUX_PANE ITERM_SESSION_ID
+      tmux() {
+        echo "$TMUX_PANE"
+      }
+    '
   else
     ZTST_unimplemented="the zsh/zpty module is not available"
   fi
-  zpty_run '
-    autoload -Uz incarg
-    for name in {,vim-,vim-backward-}{,sync-}{inc,dec}arg; do
-      zle -N "$name" incarg
-    done
-    bindkey -v "^N" incarg
-    bindkey -v "^P" decarg
-    bindkey -v "^F" sync-incarg
-    bindkey -v "^B" sync-decarg
-    bindkey -a "^N" vim-incarg
-    bindkey -a "^P" vim-decarg
-    bindkey -a "^F" vim-sync-incarg
-    bindkey -a "^B" vim-sync-decarg
-    bindkey -a "^E" vim-backward-incarg
-    bindkey -a "^Y" vim-backward-decarg
-    unset TMUX_PANE ITERM_SESSION_ID
-    tmux() {
-      echo "$TMUX_PANE"
-    }
-  '
 
 %test
 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-09-14  0:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-14  0:02 PATCH: fix X05 to not produce errors when zpty is missing Oliver Kiddle

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).