mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-03 10:21:46 +02:00
46174/0002: test harness: Restore indentation after the previous commit. No functional change.
This commit is contained in:
parent
63fde0b744
commit
805b946b53
2 changed files with 21 additions and 18 deletions
|
@ -1,5 +1,8 @@
|
|||
2020-07-05 Daniel Shahaf <d.s@daniel.shahaf.name>
|
||||
|
||||
* 46174/0002: Test/comptest: test harness: Restore indentation
|
||||
after the previous commit. No functional change.
|
||||
|
||||
* 46174/0001: Test/comptest: test harness: Plug a symlink attack
|
||||
|
||||
2020-07-03 Matthew Martin <phy1729@gmail.com>
|
||||
|
|
|
@ -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 () {
|
||||
|
|
Loading…
Reference in a new issue