From: Thomas Klausner <tk@giga.or.at>
To: git@vger.kernel.org
Subject: cogito-0.16: t/test-lib.sh: Unportable test(1) construct
Date: Mon, 16 Oct 2006 03:05:20 +0200 [thread overview]
Message-ID: <20061016010520.GS25390@danbala.tuwien.ac.at> (raw)
[-- Attachment #1: Type: text/plain, Size: 246 bytes --]
Hi!
As of version 0.16, cogito is using an unportable bash extension
"==" for test(1) in t/test-lib.sh. This is not supported by most
other shells or even test(1) from GNU coreutils. Please use "="
instead. A patch is attached.
Thanks,
Thomas
[-- Attachment #2: patch-aa --]
[-- Type: text/plain, Size: 851 bytes --]
$NetBSD: patch-aa,v 1.1 2006/10/16 00:44:15 wiz Exp $
--- t/test-lib.sh.orig 2005-11-27 16:26:16.000000000 +0000
+++ t/test-lib.sh
@@ -87,16 +87,16 @@ test_failure_ () {
say "FAIL $test_count: $1"
shift
echo "$@" | sed -e 's/^/ /'
- test "$immediate" == "" || exit 1
+ test "$immediate" = "" || exit 1
}
test_debug () {
- test "$debug" == "" || eval "$1"
+ test "$debug" = "" || eval "$1"
}
test_expect_failure () {
- test "$#" == 2 ||
+ test "$#" = 2 ||
error "bug in the test script: not 2 parameters to test-expect-failure"
say >&3 "expecting failure: $2"
if eval >&3 2>&4 "$2"
@@ -108,7 +108,7 @@ test_expect_failure () {
}
test_expect_success () {
- test "$#" == 2 ||
+ test "$#" = 2 ||
error "bug in the test script: not 2 parameters to test-expect-success"
say >&3 "expecting success: $2"
if eval >&3 2>&4 "$2"
next reply other threads:[~2006-10-16 1:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-16 1:05 Thomas Klausner [this message]
2006-10-16 1:47 ` cogito-0.16: t/test-lib.sh: Unportable test(1) construct Petr Baudis
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=20061016010520.GS25390@danbala.tuwien.ac.at \
--to=tk@giga.or.at \
--cc=git@vger.kernel.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox