Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: completion tests
- X-seq: zsh-workers 9960
- From: Tanaka Akira <akr@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: PATCH: completion tests
- Date: 02 Mar 2000 02:13:42 +0900
- In-reply-to: Sven Wischnowsky's message of "Wed, 1 Mar 2000 15:01:40 +0100 (MET)"
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <200003011401.PAA27932@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
In article <200003011401.PAA27932@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author