From: Tanaka Akira <akr@jaist.ac.jp>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: completion tests
Date: 02 Mar 2000 02:13:42 +0900 [thread overview]
Message-ID: <rsqaeki62bd.fsf@crane.jaist.ac.jp> (raw)
In-Reply-To: Sven Wischnowsky's message of "Wed, 1 Mar 2000 15:01:40 +0100 (MET)"
In article <200003011401.PAA27932@beta.informatik.hu-berlin.de>,
Sven Wischnowsky <wischnow@informatik.hu-berlin.de> writes:
> I couldn't test it with comptest, though, because that doesn't seem to
> work for me, dunno where the problem is.
I found a timing problem in comptest. The problem is reproducible on
Vine Linux --- Redhat based distribution mainly distributed in Japan.
When a child process on pty exits just after printing a string, zsh
may overlook the string.
This patch avoids the problem by sleeping a second before exit.
Index: Test/comptest
===================================================================
RCS file: /projects/zsh/zsh/Test/comptest,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 comptest
--- Test/comptest 2000/03/01 15:38:26 1.1.1.3
+++ Test/comptest 2000/03/01 17:05:26
@@ -54,6 +54,7 @@
}
finish () {
print "<WIDGET><finish>"
+ sleep 1
exit 0
}
zle -N expand-or-complete-with-report
@@ -68,14 +69,23 @@
export PS1="<PROMPT>"
zpty zsh "$zsh" -f
-zpty -r zsh log "*<PROMPT>*"
+zpty -r zsh log1 "*<PROMPT>*" || {
+ print first prompt doesn\'t appered.
+ exit 1
+}
zpty -w zsh ". $tmp"
-zpty -r zsh log "*<PROMPT>*"
+zpty -r zsh log2 "*<PROMPT>*" || {
+ print second prompt doesn\'t appered.
+ exit 1
+}
rm $tmp
-zpty -w zsh "$input"$'\C-Z'
-zpty -r zsh log "*<WIDGET><finish>*"
+zpty -n -w zsh "$input"$'\C-Z'
+zpty -r zsh log "*<WIDGET><finish>*" || {
+ print finish widget doesn\'t invoked.
+ exit 1
+}
if [[ -n "$debug" ]]; then
print -lr - "$log" > /tmp/comptest.debug
Index: Test/53completion.ztst
===================================================================
RCS file: /projects/zsh/zsh/Test/53completion.ztst,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 53completion.ztst
--- Test/53completion.ztst 2000/02/29 15:51:21 1.1.1.1
+++ Test/53completion.ztst 2000/03/01 17:05:35
@@ -104,11 +104,11 @@
>DESCRIPTION:{desc1}
>NO:{arg1}
-# code='compdef _tst tst; _tst () { _arguments "-\+[opt]" }'
-# comptest -c "$code" $'tst -\C-D'
-#0:_arguments
-#>DESCRIPTION:{option}
-#>NO:{-+ -- opt}
+ code='compdef _tst tst; _tst () { _arguments "-\+[opt]" }'
+ comptest -c "$code" $'tst -\C-D'
+0:_arguments
+>DESCRIPTION:{option}
+>NO:{-+ -- opt}
code='compdef _tst tst; _tst () { _arguments "1:desc1:(arg1)" }'
comptest -c "$code" $'tst \t'
--
Tanaka Akira
next prev parent reply other threads:[~2000-03-01 17:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-03-01 14:01 Sven Wischnowsky
2000-03-01 14:52 ` Tanaka Akira
2000-03-01 17:13 ` Tanaka Akira [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-03-01 15:28 Sven Wischnowsky
2000-03-01 15:37 ` Tanaka Akira
2000-03-01 11:44 Sven Wischnowsky
2000-03-01 13:11 ` Tanaka Akira
2000-02-29 15:50 Tanaka Akira
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=rsqaeki62bd.fsf@crane.jaist.ac.jp \
--to=akr@jaist.ac.jp \
--cc=zsh-workers@sunsite.auc.dk \
/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).