summaryrefslogtreecommitdiffstats
path: root/Test
diff options
context:
space:
mode:
authorJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2020-07-09 19:06:07 +0900
committerJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2020-07-09 19:06:07 +0900
commitc04a39187704e2b46a46f9aeee370365aeff4b1f (patch)
tree64e82cd715864597a772162ad73dd1c23b90286c /Test
parent46216: update for ansible 2.9 (diff)
downloadzsh-c04a39187704e2b46a46f9aeee370365aeff4b1f.tar
zsh-c04a39187704e2b46a46f9aeee370365aeff4b1f.tar.gz
zsh-c04a39187704e2b46a46f9aeee370365aeff4b1f.tar.bz2
zsh-c04a39187704e2b46a46f9aeee370365aeff4b1f.tar.lz
zsh-c04a39187704e2b46a46f9aeee370365aeff4b1f.tar.xz
zsh-c04a39187704e2b46a46f9aeee370365aeff4b1f.tar.zst
zsh-c04a39187704e2b46a46f9aeee370365aeff4b1f.zip
46215: make the test for RM_STAR_SILENT work on wider systems
Diffstat (limited to 'Test')
-rw-r--r--Test/E01options.ztst15
1 files changed, 9 insertions, 6 deletions
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)