zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: Leo Famulari <leo@famulari.name>, <zsh-workers@zsh.org>
Subject: Re: Zsh 5.6 test failures in A05execution.ztst
Date: Wed, 5 Sep 2018 09:49:01 +0100	[thread overview]
Message-ID: <20180905084903eucas1p291cfed8afb60dd36b272890d8298349d~RdMZzCXLs2511025110eucas1p2l@eucas1p2.samsung.com> (raw)
In-Reply-To: <20180905084958.5b1b4552@camnpupstephen.cam.scsc.local>

On Wed, 5 Sep 2018 08:49:58 +0100
Peter Stephenson <p.stephenson@samsung.com> wrote:
> Can you confirm this works OK?

Sorry, I've missed quite a lot of the point there.

Try this...

diff --git a/Test/A05execution.ztst b/Test/A05execution.ztst
index fb39d05..b08286f 100644
--- a/Test/A05execution.ztst
+++ b/Test/A05execution.ztst
@@ -6,16 +6,20 @@
 
   cd command.tmp
 
-  print '#!/bin/sh\necho This is top' >tstcmd
+  shcmd="$(which sh)"
+  shpath=${shcmd:h}
+  echocmd="$(which -p echo)"
+  echopath=${echocmd:h}
+  print "#!${shcmd}\necho This is top" >tstcmd
 
-  print '#!/bin/sh\necho This is dir1' >dir1/tstcmd
+  print "#!${shcmd}\necho This is dir1" >dir1/tstcmd
 
-  print '#!/bin/sh\necho This is dir2' >dir2/tstcmd
+  print "#!${shcmd}\necho This is dir2" >dir2/tstcmd
 
   print -n '#!sh\necho This is slashless' >tstcmd-slashless
   print -n '#!echo foo\necho This is arg' >tstcmd-arg
   print '#!xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxnyyy' >tstcmd-interp-too-long
-  print '#!/bin/sh\necho should not execute; exit 1' >xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxn
+  print "#!${sh}\necho should not execute; exit 1" >xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxn
 
   chmod 755 tstcmd dir1/tstcmd dir2/tstcmd
   chmod 755 tstcmd-slashless tstcmd-arg tstcmd-interp-too-long
@@ -40,15 +44,15 @@
 0:path (2)
 >This is top
 
-  PATH=/bin:${ZTST_testdir}/command.tmp/ tstcmd-slashless
+  PATH=${echopath}:${ZTST_testdir}/command.tmp/ tstcmd-slashless
 0:path (3)
 >This is slashless
 
-  PATH=/bin:${ZTST_testdir}/command.tmp tstcmd-arg
+  PATH=${shpath}:${ZTST_testdir}/command.tmp tstcmd-arg
 0:path (4)
 *>foo */command.tmp/tstcmd-arg
 
-  path=(/bin ${ZTST_testdir}/command.tmp/)
+  path=($shpath $echopath ${ZTST_testdir}/command.tmp/)
   tstcmd-interp-too-long 2>&1; echo "status $?"
   path=($storepath)
 0:path (5)


  parent reply	other threads:[~2018-09-05  8:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20180904224101epcas1p22c7c1a0fc8465715429c07c0b49177a5@epcas1p2.samsung.com>
2018-09-04 22:40 ` Leo Famulari
2018-09-05  7:49   ` Peter Stephenson
2018-09-05 10:25     ` 5.6.1? (was: Re: Zsh 5.6 test failures in A05execution.ztst) Daniel Shahaf
     [not found]   ` <20180905084958.5b1b4552@camnpupstephen.cam.scsc.local>
2018-09-05  8:49     ` Peter Stephenson [this message]
2018-09-05 16:45       ` Zsh 5.6 test failures in A05execution.ztst Leo Famulari
2018-09-05 16:59         ` Peter Stephenson

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='20180905084903eucas1p291cfed8afb60dd36b272890d8298349d~RdMZzCXLs2511025110eucas1p2l@eucas1p2.samsung.com' \
    --to=p.stephenson@samsung.com \
    --cc=leo@famulari.name \
    --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).