diff options
-rw-r--r-- | Test/53completion.ztst | 10 | ||||
-rw-r--r-- | Test/comptest | 18 |
2 files changed, 19 insertions, 9 deletions
diff --git a/Test/53completion.ztst b/Test/53completion.ztst index 00f1c9218..f91fe90a3 100644 --- a/Test/53completion.ztst +++ b/Test/53completion.ztst @@ -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' diff --git a/Test/comptest b/Test/comptest index e8f1ffef6..d9c3c40d0 100644 --- a/Test/comptest +++ b/Test/comptest @@ -54,6 +54,7 @@ list-choices-with-report () { } finish () { print "<WIDGET><finish>" + sleep 1 exit 0 } zle -N expand-or-complete-with-report @@ -68,14 +69,23 @@ End 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 |