[PATCH] t/t5560: use `X=Y && export X' not `export X=Y'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]