zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: `- perl' instead of `- sh'
@ 1999-12-17 14:53 Tanaka Akira
  1999-12-28 20:21 ` Tanaka Akira
  0 siblings, 1 reply; 3+ messages in thread
From: Tanaka Akira @ 1999-12-17 14:53 UTC (permalink / raw)
  To: zsh-workers

On Solaris 7, `- sh -c ...' executes /etc/profile and $HOME/.profile
and doesn't execute shell commands provided by command line arguments.

| Z:akr@is27e1u11% make check
| cd Test ; gmake check
| gmake[1]: Entering directory `/space/akr/zsh/zsh-main-trunc/Test'
| for f in *.ztst; do \
|   ../Src/zsh -f ztst.zsh $f; \
| done
| *** /tmp/zsh.ztst.out.26274     Fri Dec 17 23:41:45 1999
| --- /tmp/zsh.ztst.tout.26274    Fri Dec 17 23:41:45 1999
| ***************
| *** 1 ****
| ! -sh
| --- 1,3 ----
| ! Sun Microsystems Inc. SunOS 5.7       Generic October 1998
| ! You have mail.
| ! akr's .profile is executed.
| Test 01grammar.ztst failed: output differs from expected as shown above for:
|   - sh -c 'echo $0'
| Was testing: `-' precommand modifier
| 01grammar.ztst: test failed.
| 02alias.ztst: all tests successful.
| 03quoting.ztst: all tests successful.
| 50cd.ztst: all tests successful.
| gmake[1]: Leaving directory `/space/akr/zsh/zsh-main-trunc/Test'
| Z:akr@is27e1u11% 

I modified the test using perl.  Although there are hosts which perl
is not installed, it is less dangerous than sh, I think.

Index: Test/01grammar.ztst
===================================================================
RCS file: /projects/zsh/zsh/Test/01grammar.ztst,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 01grammar.ztst
--- Test/01grammar.ztst	1999/12/13 19:06:59	1.1.1.1
+++ Test/01grammar.ztst	1999/12/17 14:39:09
@@ -50,9 +50,9 @@
 #
 # Tests for `Precommand Modifiers'
 #
-  - sh -c 'echo $0'
+  - perl -e 'print "$^X\n"'
 0:`-' precommand modifier
->-sh
+>-perl
 
   echo f*
   noglob echo f*
-- 
Tanaka Akira


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: `- perl' instead of `- sh'
  1999-12-17 14:53 PATCH: `- perl' instead of `- sh' Tanaka Akira
@ 1999-12-28 20:21 ` Tanaka Akira
  1999-12-29 20:40   ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Tanaka Akira @ 1999-12-28 20:21 UTC (permalink / raw)
  To: zsh-workers

In article <rsqr9gllitt.fsf@crane.jaist.ac.jp>,
  Tanaka Akira <akr@jaist.ac.jp> writes:

> On Solaris 7, `- sh -c ...' executes /etc/profile and $HOME/.profile
> and doesn't execute shell commands provided by command line arguments.

9108 is not included in 3.1.6-pws-13.  I guess it's because 9108 uses perl.
So I tried to find more portable way to fix the problem.

This patch uses another scripting language --- zsh.  Unfortunately it
is less portable than perl in usual.  But it is perfectly portable in
this case.

Index: Test/01grammar.ztst
===================================================================
RCS file: /projects/zsh/zsh/Test/01grammar.ztst,v
retrieving revision 1.1.1.3
diff -u -F^( -r1.1.1.3 01grammar.ztst
--- Test/01grammar.ztst	1999/12/23 23:01:55	1.1.1.3
+++ Test/01grammar.ztst	1999/12/28 20:13:58
@@ -50,9 +50,8 @@
 #
 # Tests for `Precommand Modifiers'
 #
-  - sh -c 'echo $0'
+  - $ZTST_testdir/../Src/zsh -fc "[[ \$0 = \"-$ZTST_testdir/../Src/zsh\" ]]"
 0:`-' precommand modifier
->-sh
 
   echo f*
   noglob echo f*
-- 
Tanaka Akira


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: `- perl' instead of `- sh'
  1999-12-28 20:21 ` Tanaka Akira
@ 1999-12-29 20:40   ` Peter Stephenson
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Stephenson @ 1999-12-29 20:40 UTC (permalink / raw)
  To: zsh-workers

Tanaka Akira wrote:
> 9108 is not included in 3.1.6-pws-13.  I guess it's because 9108 uses perl.
> So I tried to find more portable way to fix the problem.

Sorry, it's more because I forgot to apply it.  But I like this better
anyway --- it gives zsh a better working out.  I usually try to say if I'm
not including a particular patch, and why, so if I don't it's worth
pointing it out.

By the way, I think that (if I remember) I'll start calling development
versions -dev instead of -pws, now they are official.  I only starting
calling them -pws because I was filling in for Zefram at the time.  I hope
this isn't going to mess up anybody's indexing system.

-- 
Peter Stephenson <pws@pwstephenson.fsnet.co.uk>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-12-30 12:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-17 14:53 PATCH: `- perl' instead of `- sh' Tanaka Akira
1999-12-28 20:21 ` Tanaka Akira
1999-12-29 20:40   ` Peter Stephenson

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).