mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-03 22:32:12 +02:00
32497: avoid using comptesteval in the middle of a series of tests
The change in control required for sourcing the command file can confuse the simulated interactive input
This commit is contained in:
parent
848065a5a2
commit
da57ddb7c8
3 changed files with 21 additions and 6 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2014-03-18 Barton E. Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
|
* Jun T: 32497: Test/X02zlevi.ztst, Test/comptest: avoid using
|
||||||
|
comptesteval in the middle of a series of tests; the change in
|
||||||
|
control required for sourcing the command file can confuse the
|
||||||
|
simulated interactive input
|
||||||
|
|
||||||
2014-03-17 Peter Stephenson <p.stephenson@samsung.com>
|
2014-03-17 Peter Stephenson <p.stephenson@samsung.com>
|
||||||
|
|
||||||
* Jun T: 32494: Doc/zman.yo: Yodl hack to fix indentation
|
* Jun T: 32494: Doc/zman.yo: Yodl hack to fix indentation
|
||||||
|
|
|
@ -21,19 +21,19 @@
|
||||||
>text
|
>text
|
||||||
>CURSOR: 8
|
>CURSOR: 8
|
||||||
|
|
||||||
comptesteval 'print -z before'
|
zpty_run 'print -z before'
|
||||||
zletest $'after\e.'
|
zletest $'after\e.'
|
||||||
0:repeat initial edit with non-blank starting line
|
0:repeat initial edit with non-blank starting line
|
||||||
>BUFFER: beforeafterafter
|
>BUFFER: beforeafterafter
|
||||||
>CURSOR: 15
|
>CURSOR: 15
|
||||||
|
|
||||||
comptesteval 'setopt overstrike;print -z bung'
|
zpty_run 'setopt overstrike;print -z bung'
|
||||||
zletest $'ing\e2|.'
|
zletest $'ing\e2|.'
|
||||||
0:repeat initial edit with overstrike set
|
0:repeat initial edit with overstrike set
|
||||||
>BUFFER: binging
|
>BUFFER: binging
|
||||||
>CURSOR: 3
|
>CURSOR: 3
|
||||||
|
|
||||||
comptesteval 'bindkey "^_" undo'
|
zpty_run 'bindkey "^_" undo'
|
||||||
zletest $'undoc\037e'
|
zletest $'undoc\037e'
|
||||||
0:use of undo in vi insert mode
|
0:use of undo in vi insert mode
|
||||||
>BUFFER: undoe
|
>BUFFER: undoe
|
||||||
|
@ -49,19 +49,19 @@
|
||||||
>BUFFER: z
|
>BUFFER: z
|
||||||
>CURSOR: 1
|
>CURSOR: 1
|
||||||
|
|
||||||
comptesteval 'bindkey -a "^K" redo'
|
zpty_run 'bindkey -a "^K" redo'
|
||||||
zletest $'123\C-_\e\C-k'
|
zletest $'123\C-_\e\C-k'
|
||||||
0:undo in insert mode, redo in command
|
0:undo in insert mode, redo in command
|
||||||
>BUFFER: 123
|
>BUFFER: 123
|
||||||
>CURSOR: 2
|
>CURSOR: 2
|
||||||
|
|
||||||
comptesteval 'bindkey "^Y" redo'
|
zpty_run 'bindkey "^Y" redo'
|
||||||
zletest $'pre\eA123\C-_\C-y\eu'
|
zletest $'pre\eA123\C-_\C-y\eu'
|
||||||
0:undo and redo in insert mode, undo in command
|
0:undo and redo in insert mode, undo in command
|
||||||
>BUFFER: pre
|
>BUFFER: pre
|
||||||
>CURSOR: 2
|
>CURSOR: 2
|
||||||
|
|
||||||
comptesteval 'bindkey "^Gu" split-undo'
|
zpty_run 'bindkey "^Gu" split-undo'
|
||||||
zletest $'one\C-gutwo\eu'
|
zletest $'one\C-gutwo\eu'
|
||||||
0:split the undo sequence
|
0:split the undo sequence
|
||||||
>BUFFER: one
|
>BUFFER: one
|
||||||
|
|
|
@ -102,6 +102,14 @@ zpty_flush() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
zpty_run() {
|
||||||
|
zpty -w zsh "$*"
|
||||||
|
zpty -r -m zsh log "*<PROMPT>*" || {
|
||||||
|
print "prompt hasn't appeared."
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
comptesteval () {
|
comptesteval () {
|
||||||
local tmp=/tmp/comptest.$$
|
local tmp=/tmp/comptest.$$
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue