git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] t/t5560: use `X=Y && export X' not `export X=Y'
@ 2010-10-07  7:47 Ævar Arnfjörð Bjarmason
  2010-10-07  7:55 ` Matthieu Moy
  2010-10-13 18:36 ` Junio C Hamano
  0 siblings, 2 replies; 5+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-10-07  7:47 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Pat Thoyts, Tarmigan Casebolt,
	Ævar Arnfjörð Bjarmason

Change t/t5560-http-backend-noserver.sh to use the `X=Y && export X'
style instead of `export X=Y'. The latter doesn't work on all POSIX
shells.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 t/t5560-http-backend-noserver.sh |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/t/t5560-http-backend-noserver.sh b/t/t5560-http-backend-noserver.sh
index 406432e..effe797 100755
--- a/t/t5560-http-backend-noserver.sh
+++ b/t/t5560-http-backend-noserver.sh
@@ -5,7 +5,11 @@ test_description='test git-http-backend-noserver'
 
 HTTPD_DOCUMENT_ROOT_PATH="$TRASH_DIRECTORY"
 
-test_have_prereq MINGW && export GREP_OPTIONS=-U
+if test_have_prereq MINGW
+then
+	GREP_OPTIONS=-U
+	export GREP_OPTIONS
+fi
 
 run_backend() {
 	echo "$2" |
@@ -15,7 +19,8 @@ run_backend() {
 }
 
 GET() {
-	export REQUEST_METHOD="GET" &&
+	REQUEST_METHOD="GET" &&
+	export REQUEST_METHOD &&
 	run_backend "/repo.git/$1" &&
 	unset REQUEST_METHOD &&
 	if ! grep "Status" act.out >act
@@ -27,8 +32,9 @@ GET() {
 }
 
 POST() {
-	export REQUEST_METHOD="POST" &&
-	export CONTENT_TYPE="application/x-$1-request" &&
+	REQUEST_METHOD="POST" &&
+	CONTENT_TYPE="application/x-$1-request" &&
+	export REQUEST_METHOD CONTENT_TYPE &&
 	run_backend "/repo.git/$1" "$2" &&
 	unset REQUEST_METHOD &&
 	unset CONTENT_TYPE &&
@@ -47,7 +53,8 @@ log_div() {
 . "$TEST_DIRECTORY"/t556x_common
 
 expect_aliased() {
-	export REQUEST_METHOD="GET" &&
+	REQUEST_METHOD="GET" &&
+	export REQUEST_METHOD &&
 	if test $1 = 0; then
 		run_backend "$2"
 	else
-- 
1.7.3.1.50.g1e633

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

end of thread, other threads:[~2010-10-13 18:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-07  7:47 [PATCH] t/t5560: use `X=Y && export X' not `export X=Y' Ævar Arnfjörð Bjarmason
2010-10-07  7:55 ` Matthieu Moy
2010-10-07  8:09   ` Ævar Arnfjörð Bjarmason
2010-10-10 17:20     ` Clemens Buchacher
2010-10-13 18:36 ` Junio C Hamano

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