summaryrefslogtreecommitdiff
path: root/Test/comptest
diff options
context:
space:
mode:
Diffstat (limited to 'Test/comptest')
-rw-r--r--Test/comptest36
1 files changed, 18 insertions, 18 deletions
diff --git a/Test/comptest b/Test/comptest
index 4a5fcb4ba..b14d4c959 100644
--- a/Test/comptest
+++ b/Test/comptest
@@ -112,25 +112,25 @@ zpty_run() {
}
comptesteval () {
- {
- # Avoid symlink attacks on the predictable filename
- # TODO: either use =(:) or create this file in the tests' workdir
- local tmp=/tmp/comptest.$$
- () {
- setopt localoptions NO_CLOBBER ERR_EXIT
- print -lr - "$@" > $tmp
- } "$@"
+ {
+ # Avoid symlink attacks on the predictable filename
+ # TODO: either use =(:) or create this file in the tests' workdir
+ local tmp=/tmp/comptest.$$
+ () {
+ setopt localoptions NO_CLOBBER ERR_EXIT
+ print -lr - "$@" > $tmp
+ } "$@"
- # zpty_flush Before comptesteval
- zpty -w zsh ". ${(q)tmp}"
- zpty -r -m zsh log_eval "*<PROMPT>*" || {
- print "prompt hasn't appeared."
- return 1
- }
- zpty_flush After comptesteval
- } always {
- rm $tmp
- }
+ # zpty_flush Before comptesteval
+ zpty -w zsh ". ${(q)tmp}"
+ zpty -r -m zsh log_eval "*<PROMPT>*" || {
+ print "prompt hasn't appeared."
+ return 1
+ }
+ zpty_flush After comptesteval
+ } always {
+ rm $tmp
+ }
}
comptest () {