From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: Commit 137b15a fails X02zlevi test
Date: Sat, 15 Feb 2014 13:35:01 -0800 [thread overview]
Message-ID: <140215133501.ZM1663@torch.brasslantern.com> (raw)
In-Reply-To: <92A29561-15C5-4282-9CDA-7EDBD4030AE6@kba.biglobe.ne.jp>
On Feb 16, 2:07am, Jun T. wrote:
} Subject: Re: Commit 137b15a fails X02zlevi test
}
} The problem is the '^R' sent by zletest $'123\C-_\e\C-r'.
} The slave-side zsh should set its tty input into non-canonical mode
} when Zle is active, but I suspect that it fails (or delays) to do so
} and the ^R does has a effect of reprint.
Ah! That makes sense. I was assuming character were lost because
the master was reading while the slave was writing, but it's just as
likely that the master writes while the slave is busy. I wan't
thinking about how stty controls affect "typeahead".
} Maybe the only call of zpty_flush necessary is
} 'zpty_flush After comptesteval'
} in comptesteval(); all the other zpty_flush call can be removed.
} With this single call of zpty_flush and ^R --> ^K, all the test pass
} on Mac and FreeBSD (without adding sleep anywhere).
OK, same here -- let's go with this, then.
diff --git a/Test/X02zlevi.ztst b/Test/X02zlevi.ztst
index fe55d8a..60f878e 100644
--- a/Test/X02zlevi.ztst
+++ b/Test/X02zlevi.ztst
@@ -49,8 +49,8 @@
>BUFFER: z
>CURSOR: 1
- comptesteval 'bindkey -a "^R" redo'
- zletest $'123\C-_\e\C-r'
+ comptesteval 'bindkey -a "^K" redo'
+ zletest $'123\C-_\e\C-k'
0:undo in insert mode, redo in command
>BUFFER: 123
>CURSOR: 2
diff --git a/Test/comptest b/Test/comptest
index 42fe651..48b6cdf 100644
--- a/Test/comptest
+++ b/Test/comptest
@@ -106,7 +106,7 @@ comptesteval () {
local tmp=/tmp/comptest.$$
print -lr - "$@" > $tmp
- zpty_flush Before comptesteval
+ # zpty_flush Before comptesteval
zpty -w zsh ". $tmp"
zpty -r -m zsh log_eval "*<PROMPT>*" || {
print "prompt hasn't appeared."
@@ -118,13 +118,11 @@ comptesteval () {
comptest () {
input="$*"
- zpty_flush Before comptest
zpty -n -w zsh "$input"$'\C-Z'
zpty -r -m zsh log "*<WIDGET><finish>*<PROMPT>*" || {
print "failed to invoke finish widget."
return 1
}
- zpty_flush After comptest
logs=(${(s:<WIDGET>:)log})
shift logs
@@ -154,12 +152,12 @@ comptest () {
zletest () {
input="$*"
- zpty_flush Before zletest
+ # zpty_flush Before zletest
zpty -n -w zsh "$input"$'\C-X'
zpty -r -m zsh log "*<WIDGET><finish>*<PROMPT>*" || {
print "failed to invoke finish widget."
return 1
}
- zpty_flush After zletest
+ # zpty_flush After zletest
print -lr "${(@)${(ps:\r\n:)log##*<WIDGET><finish>}[1,-2]}"
}
prev parent reply other threads:[~2014-02-15 21:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-08 20:13 Bart Schaefer
2014-02-08 22:45 ` Bart Schaefer
2014-02-09 18:53 ` Bart Schaefer
2014-02-09 21:00 ` Peter Stephenson
2014-02-09 22:30 ` Oliver Kiddle
2014-02-11 7:37 ` Bart Schaefer
2014-02-13 5:49 ` Bart Schaefer
2014-02-13 9:32 ` Peter Stephenson
2014-02-13 16:17 ` Jun T.
2014-02-13 17:39 ` Bart Schaefer
2014-02-14 15:59 ` Jun T.
2014-02-15 1:42 ` Bart Schaefer
2014-02-15 17:07 ` Jun T.
2014-02-15 21:35 ` Bart Schaefer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=140215133501.ZM1663@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).