Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Five New Test Failures
Yes, that worked.
BTW, I have no idea how my PS1 gets set to %m (I checked), but this
compares OK.
Thanks,
Vin
On Wed, Jul 8, 2020 at 6:50 AM Jun T <takimoto-j@xxxxxxxxxxxxxxxxx> wrote:
>
> Sorry, please forget the previous patch.
> I noticed that we should better to start the subshell without zle,
> i.e., with option +Z. Then the command 'rm *' is not echoed back.
>
> > 2020/07/08 9:25, I wrote:
> >
> > There is no prompt problem here, but the 'n' sent by the test is
> > echoed back and causes the failure.
>
> But I still get this 'n' on Fedora32 (maybe also on Ubuntu20.04).
> I don't know why. It doesn't happen on CentOS8.
> It seems we need '(|n)' at the end of the pattern.
>
> In the patch below, I explicitly set PS1 and wait for the prompt.
>
> Do we need to set MODULE_PATH in the subshell?
> I guess we don't since no module is used in this test?
>
> diff --git a/Test/E01options.ztst b/Test/E01options.ztst
> index c59509f2e..5a1c8ebcf 100644
> --- a/Test/E01options.ztst
> +++ b/Test/E01options.ztst
> @@ -1432,12 +1432,13 @@ F:If this test fails at the first unsetopt, refer
> to P01privileged.ztst.
> '/' '/*'
> 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 +1449,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)
>
>
>
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author