From c04a39187704e2b46a46f9aeee370365aeff4b1f Mon Sep 17 00:00:00 2001 From: Jun-ichi Takimoto Date: Thu, 9 Jul 2020 19:06:07 +0900 Subject: 46215: make the test for RM_STAR_SILENT work on wider systems --- ChangeLog | 6 ++++++ Test/E01options.ztst | 15 +++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 254597dc9..d8da32500 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2020-07-09 Jun-ichi Takimoto + + * 46215 (w/ minor tweak): Test/E01options.ztst: make the test + added by 46175/0002 work on wider systems, and skip the test + on Cygwin. + 2020-07-08 Oliver Kiddle * 46216: Completion/Unix/Command/_ansible: update for ansible 2.9 diff --git a/Test/E01options.ztst b/Test/E01options.ztst index c59509f2e..cff7893d5 100644 --- a/Test/E01options.ztst +++ b/Test/E01options.ztst @@ -1426,18 +1426,21 @@ F:If this test fails at the first unsetopt, refer to P01privileged.ztst. fi 0:PRIVILEGED sanity check: default value is correct - if zmodload -e zsh/zpty 2>/dev/null; then + if [[ $OSTYPE == cygwin ]]; then + ZTST_skip='the zsh/zpty module does not work on Cygwin' + elif zmodload -e zsh/zpty 2>/dev/null; then for target_dir target_pattern in \ '.' '*' \ '/' '/*' do before=`ls -a -- $target_dir` - zpty subshell $ZTST_testdir/../Src/zsh -f + zpty subshell $ZTST_testdir/../Src/zsh -f +Z [[ $PWD == */options.tmp ]] || return 1 # Sanity check before calling rm(1). + zpty -w subshell 'PS1=PROMPT' + zpty -r -m subshell REPLY $'*PROMPT' zpty -w subshell "rm $target_pattern" - zpty -w subshell 'n' + zpty -w -n subshell 'n' sleep 1 - zpty -rt subshell REPLY # "${PS1} rm *" zpty -rt subshell REPLY && print -r -- ${REPLY%%$'\r\n'} zpty -d subshell after=`ls -a -- $target_dir` @@ -1448,5 +1451,5 @@ F:If this test fails at the first unsetopt, refer to P01privileged.ztst. fi BEL=$'\a' 0q:RM_STAR_SILENT -*>zsh: sure you want to delete all 15 files in ${PWD:h}/options.tmp \[yn\]\? ${BEL} -*>zsh: sure you want to delete all <-> files in / \[yn\]\? ${BEL} +*>zsh: sure you want to delete all 15 files in ${PWD:h}/options.tmp \[yn\]\? ${BEL}(|n) +*>zsh: sure you want to delete all <-> files in / \[yn\]\? ${BEL}(|n) -- cgit 1.4.1