1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2026-01-06 09:41:07 +01:00

34772: add new test suite file for history; fix "read" usage in comptest

This commit is contained in:
Barton E. Schaefer 2015-03-23 21:18:58 -07:00
parent f6be7bc19f
commit 13bad92fd8
3 changed files with 26 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2015-03-23 Barton E. Schaefer <schaefer@zsh.org>
* 34772: Test/W01history.ztst, Test/comptest: add new test
suite file for history; fix "read" usage in comptest for case
where there is no TTY
2015-03-22 Peter Stephenson <p.w.stephenson@ntlworld.com>
* 34759: Src/hist.c, Src/lex.c: safer implementation.

19
Test/W01history.ztst Normal file
View file

@ -0,0 +1,19 @@
# Tests for BANG_HIST replacements
%prep
[[ -t 0 ]] && print -u $ZTST_fd History tests write to /dev/tty
%test
$ZTST_testdir/../Src/zsh -fis <<<'
echo foo bar
echo $(!!) again
echo more $( !! )' 2>/dev/null
0:Regression test for history references in command substitution
>foo bar
>foo bar again
>more foo bar again
*?*
F:Check that a history bug introduced by workers/34160 is working again.
F:Discarded line of error output consumes prompts printed by "zsh -i".

View file

@ -164,7 +164,7 @@ zletest () {
for input; do
# zpty_flush Before zletest
# sleep for $KEYTIMEOUT
(( first++ )) && read -t 0.011 -k 1 < /dev/null
(( first++ )) && read -t 0.011 -u 0 -k 1 < /dev/null
zpty -n -w zsh "$input"
done
zpty -n -w zsh $'\C-X'