diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2009-01-13 12:09:26 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2009-01-13 12:09:26 +0000 |
commit | e7c9e03c58f04a04c35a0e4c3721f939ba5e58c2 (patch) | |
tree | c526cf6141b9ca2aacd569b0a65628858a71eb61 /Test/comptest | |
parent | e763f79b3f85f34edabf1e05304c757c8ef6f092 (diff) | |
download | zsh-e7c9e03c58f04a04c35a0e4c3721f939ba5e58c2.tar.gz zsh-e7c9e03c58f04a04c35a0e4c3721f939ba5e58c2.tar.xz zsh-e7c9e03c58f04a04c35a0e4c3721f939ba5e58c2.zip |
26301: make zpty -r exit more cleanly on bad reads
add option -m to make zpty -r return status 1 if pattern failed to match use this option in comptest
Diffstat (limited to 'Test/comptest')
-rw-r--r-- | Test/comptest | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Test/comptest b/Test/comptest index 8a3900f5e..14938a7cd 100644 --- a/Test/comptest +++ b/Test/comptest @@ -80,7 +80,7 @@ comptesteval () { print -lr - "$@" > $tmp zpty -w zsh ". $tmp" - zpty -r zsh log_eval "*<PROMPT>*" || { + zpty -r -m zsh log_eval "*<PROMPT>*" || { print "prompt hasn't appeared." return 1 } @@ -90,7 +90,7 @@ comptesteval () { comptest () { input="$*" zpty -n -w zsh "$input"$'\C-Z' - zpty -r zsh log "*<WIDGET><finish>*<PROMPT>*" || { + zpty -r -m zsh log "*<WIDGET><finish>*<PROMPT>*" || { print "failed to invoke finish widget." return 1 } |