Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Five New Test Failures
Jun -
Thanks for asking. "nuc2" is the hostname of a Manjaro (arch-based)
system. I assumed that got consumed by the leading * in the response.
I'll try out your patch.
- Vin
On Tue, Jul 7, 2020 at 8:25 PM Jun T <takimoto-j@xxxxxxxxxxxxxxxxx> wrote:
>
> > 2020/07/07 23:14, Vin Shelton <acs@xxxxxxxxxxxxxxxxxxxx> wrote:
> >
> > -<zsh: sure you want to delete all 15 files in
> > /opt/build/zsh-2020-07-07/Test/options.tmp \[yn\]\?
> > <zsh: sure you want to delete all <-> files in / \[yn\]\?
> > +>nuc2% zsh: sure you want to delete all 15 files in
> > /opt/build/zsh-2020-07-07/Test/options.tmp [yn]?
>
> It seems the prompt 'nuc2% ' is not consumed by the line
> zpty -rt subshell REPLY # "${PS1} rm *"
> in the test. Which operating system are you using?
>
> On Fedora32 and Ubuntu20.04 and I got a different diff:
> Pattern match failed, line 1:
> -<zsh: sure you want to delete all 15 files in
> /home/takimoto/src/zsh/Test/options.tmp \[yn\]\?
> <zsh: sure you want to delete all <-> files in / \[yn\]\?
> +>zsh: sure you want to delete all 15 files in
> /home/takimoto/src/zsh/Test/options.tmp [yn]? n
> >zsh: sure you want to delete all 20 files in / [yn]? n
>
> There is no prompt problem here, but the 'n' sent by the test is
> echoed back and causes the failure.
>
> On macOS, the diff is:
> Pattern match failed, line mismatch (2/1):
> <zsh: sure you want to delete all 15 files in
> /Users/takimoto/dev/src/zsh/zsh/Test/options.tmp \[yn\]\?
> <zsh: sure you want to delete all <-> files in / \[yn\]\?
> >
>
> In this case virtually no response from the zpty.
>
>
> The following patch seems to work on the above three systems,
> but there is a possibility that it fails with very low probability.
> I haven't tested on other OSs.
>
>
> diff --git a/Test/E01options.ztst b/Test/E01options.ztst
> index c59509f2e..d8b3d7d21 100644
> --- a/Test/E01options.ztst
> +++ b/Test/E01options.ztst
> @@ -1435,9 +1435,9 @@ F:If this test fails at the first unsetopt, refer to
> P01privileged.ztst.
> zpty subshell $ZTST_testdir/../Src/zsh -f
> [[ $PWD == */options.tmp ]] || return 1 # Sanity check before
> calling rm(1).
> zpty -w subshell "rm $target_pattern"
> - zpty -w subshell 'n'
> + zpty -w -n subshell 'n'
> + zpty -r -m subshell REPLY $'*rm *\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 +1448,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