diff options
author | Barton E. Schaefer <schaefer@zsh.org> | 2015-03-23 21:18:58 -0700 |
---|---|---|
committer | Barton E. Schaefer <schaefer@zsh.org> | 2015-03-23 21:18:58 -0700 |
commit | 13bad92fd85c4e4a3077080606f6ad6217b29bd5 (patch) | |
tree | c524d51dae6b4155b297d130d9eb0a17eebccf29 | |
parent | f6be7bc19f4db61ddf7ce01e34f878c27eb5cb40 (diff) | |
download | zsh-13bad92fd85c4e4a3077080606f6ad6217b29bd5.tar.gz zsh-13bad92fd85c4e4a3077080606f6ad6217b29bd5.tar.xz zsh-13bad92fd85c4e4a3077080606f6ad6217b29bd5.zip |
34772: add new test suite file for history; fix "read" usage in comptest
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | Test/W01history.ztst | 19 | ||||
-rw-r--r-- | Test/comptest | 2 |
3 files changed, 26 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index c5f2a81af..0925234a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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. diff --git a/Test/W01history.ztst b/Test/W01history.ztst new file mode 100644 index 000000000..2492c418f --- /dev/null +++ b/Test/W01history.ztst @@ -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". diff --git a/Test/comptest b/Test/comptest index 9c92f96ec..ef8421755 100644 --- a/Test/comptest +++ b/Test/comptest @@ -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' |