From: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
To: jon.seymour@gmail.com
Cc: Junio C Hamano <gitster@pobox.com>,
GIT Mailing-list <git@vger.kernel.org>
Subject: [PATCH] t7403-*.sh: Avoid use of the nonportable '==' operator
Date: Sat, 26 May 2012 17:51:23 +0100 [thread overview]
Message-ID: <4FC10A0B.5080407@ramsay1.demon.co.uk> (raw)
Some shells, including dash, do not support using the '==' string
equality operator. This results in the failure of tests 7-12 with
'test' complaining of an "unexpected operator".
In order to suppress the errors, we replace the '==' operator with
'=', which must be supported by any POSIX shell.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
Hi Jon,
If you need to re-roll your patches from the 'js/submodule-relative'
branch (commits 3f4542e and efa4c90), could you please squash this
fix into them.
Thanks!
ATB,
Ramsay Jones
t/t7403-submodule-sync.sh | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/t/t7403-submodule-sync.sh b/t/t7403-submodule-sync.sh
index 583fe21..3d85739 100755
--- a/t/t7403-submodule-sync.sh
+++ b/t/t7403-submodule-sync.sh
@@ -93,7 +93,7 @@ test_expect_success '"git submodule sync" handles origin URL of the form foo' '
git remote set-url origin foo
git submodule sync &&
(cd submodule &&
- test "$(git config remote.origin.url)" == "../submodule"
+ test "$(git config remote.origin.url)" = "../submodule"
)
)
'
@@ -103,7 +103,7 @@ test_expect_success '"git submodule sync" handles origin URL of the form foo/bar
git remote set-url origin foo/bar
git submodule sync &&
(cd submodule &&
- test "$(git config remote.origin.url)" == "../foo/submodule"
+ test "$(git config remote.origin.url)" = "../foo/submodule"
)
)
'
@@ -113,7 +113,7 @@ test_expect_success '"git submodule sync" handles origin URL of the form ./foo'
git remote set-url origin ./foo
git submodule sync &&
(cd submodule &&
- test "$(git config remote.origin.url)" == "../submodule"
+ test "$(git config remote.origin.url)" = "../submodule"
)
)
'
@@ -123,7 +123,7 @@ test_expect_success '"git submodule sync" handles origin URL of the form ./foo/b
git remote set-url origin ./foo/bar
git submodule sync &&
(cd submodule &&
- test "$(git config remote.origin.url)" == "../foo/submodule"
+ test "$(git config remote.origin.url)" = "../foo/submodule"
)
)
'
@@ -133,7 +133,7 @@ test_expect_success '"git submodule sync" handles origin URL of the form ../foo'
git remote set-url origin ../foo
git submodule sync &&
(cd submodule &&
- test "$(git config remote.origin.url)" == "../../submodule"
+ test "$(git config remote.origin.url)" = "../../submodule"
)
)
'
@@ -143,7 +143,7 @@ test_expect_success '"git submodule sync" handles origin URL of the form ../foo/
git remote set-url origin ../foo/bar
git submodule sync &&
(cd submodule &&
- test "$(git config remote.origin.url)" == "../../foo/submodule"
+ test "$(git config remote.origin.url)" = "../../foo/submodule"
)
)
'
--
1.7.10
next reply other threads:[~2012-05-26 17:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-26 16:51 Ramsay Jones [this message]
2012-05-26 22:21 ` [PATCH] t7403-*.sh: Avoid use of the nonportable '==' operator Jon Seymour
2012-05-27 6:53 ` Junio C Hamano
2012-05-27 7:01 ` Jon Seymour
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=4FC10A0B.5080407@ramsay1.demon.co.uk \
--to=ramsay@ramsay1.demon.co.uk \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jon.seymour@gmail.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