From c95c2ac838e04e507f8e4d9bd0ed4d966306a9b9 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Mon, 17 Nov 2014 16:19:12 +0100 Subject: 33699: support short delays in zle tests where we need KEYTIMEOUT to elapse --- Test/comptest | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'Test/comptest') diff --git a/Test/comptest b/Test/comptest index 96072fdcc..654c0f168 100644 --- a/Test/comptest +++ b/Test/comptest @@ -36,6 +36,7 @@ comptestinit () { 'LISTMAX=10000000 stty 38400 columns 80 rows 24 werase undef TERM=vt100 +KEYTIMEOUT=1 setopt zle autoload -U compinit compinit -u @@ -159,9 +160,14 @@ comptest () { } zletest () { - input="$*" - # zpty_flush Before zletest - zpty -n -w zsh "$input"$'\C-X' + local first=0 + for input; do + # sleep for $KEYTIMEOUT + (( first++ )) && read -t 0.011 -k 1 < /dev/null + # zpty_flush Before zletest + zpty -n -w zsh "$input" + done + zpty -n -w zsh $'\C-X' zpty -r -m zsh log "***" || { print "failed to invoke finish widget." return 1 -- cgit 1.4.1