zsh-workers
 help / color / mirror / code / Atom feed
From: Jun T <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@zsh.org
Subject: Re: Five New Test Failures
Date: Wed, 8 Jul 2020 09:25:05 +0900	[thread overview]
Message-ID: <00445BFC-A800-49B6-A4FD-B1F294764245@kba.biglobe.ne.jp> (raw)
In-Reply-To: <CACeGjnWkkXui2NJb8XiVe3Z91BkFTUexHkzfzWHh+6PNc73eZA@mail.gmail.com>


> 2020/07/07 23:14, Vin Shelton <acs@alumni.princeton.edu> 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)




  parent reply	other threads:[~2020-07-08  0:25 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-05 15:28 Vin Shelton
2020-07-05 16:28 ` Bart Schaefer
2020-07-05 16:57   ` Bart Schaefer
2020-07-05 17:22     ` Bart Schaefer
2020-07-07 14:14       ` Vin Shelton
2020-07-07 16:03         ` Daniel Shahaf
2020-07-07 16:39           ` Bart Schaefer
2020-07-07 19:33             ` Vin Shelton
2020-07-08  0:25         ` Jun T [this message]
2020-07-08  1:03           ` Vin Shelton
2020-07-08 10:49           ` Jun T
2020-07-08 18:23             ` Vin Shelton
2020-07-08 20:30               ` Bart Schaefer
2020-07-08 20:55                 ` Vin Shelton
2020-07-09  8:04               ` Jun T
2020-07-11  0:02                 ` Daniel Shahaf
2020-07-09 10:17             ` Jun T
2020-07-11  0:03               ` Daniel Shahaf
2020-07-05 16:54 ` Message size limit? (was: Five New Test Failures) Daniel Shahaf
2020-07-05 17:13   ` Vin Shelton
2020-07-07 16:06     ` Daniel Shahaf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=00445BFC-A800-49B6-A4FD-B1F294764245@kba.biglobe.ne.jp \
    --to=takimoto-j@kba.biglobe.ne.jp \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).