From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com
Subject: [PATCH] tests: fix spurious error when run directly with Solaris /usr/xpg4/bin/sh
Date: Fri, 2 Mar 2012 11:33:53 +0100 [thread overview]
Message-ID: <f3294212cbaf9bc0d6446d2cdf13619d0317b9e4.1330684369.git.stefano.lattarini@gmail.com> (raw)
If any test script is run directly with Solaris 10 /usr/xpg4/bin/sh or
/bin/ksh, it fails spuriously with a message like:
t0000-basic.sh[31]: unset: bad argument count
This happens because those shells bail out when encountering a call to
"unset" with no arguments, and such unset call could take place in
'test-lib.sh'. Fix that issue, and add a proper comment to ensure we
don't regress in this respect.
---
t/test-lib.sh | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/t/test-lib.sh b/t/test-lib.sh
index a089a18..c0d04c4 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -42,10 +42,11 @@ TZ=UTC
TERM=dumb
export LANG LC_ALL PAGER TERM TZ
EDITOR=:
-unset VISUAL
-unset EMAIL
-unset LANGUAGE
-unset $(perl -e '
+# A call to "unset" with no arguments causes at least Solaris 10
+# /usr/xpg4/bin/sh and /bin/ksh to bail out. So keep the unsets
+# deriving from the command substitution clustered with the other
+# ones.
+unset VISUAL EMAIL LANGUAGE $(perl -e '
my @env = keys %ENV;
my $ok = join("|", qw(
TRACE
--
1.7.9
next reply other threads:[~2012-03-02 10:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-02 10:33 Stefano Lattarini [this message]
2012-03-02 18:38 ` [PATCH] tests: fix spurious error when run directly with Solaris /usr/xpg4/bin/sh Junio C Hamano
2012-03-02 18:48 ` [PATCH v2] " Stefano Lattarini
2012-03-02 22:41 ` Junio C Hamano
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=f3294212cbaf9bc0d6446d2cdf13619d0317b9e4.1330684369.git.stefano.lattarini@gmail.com \
--to=stefano.lattarini@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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.
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).