From: Tarmigan Casebolt Date: Thu, 14 Jan 2010 07:01:17 GMT Subject: [PATCH] Test t5560: Fix test when run with dash Message-ID: <1263452477-15250-1-git-send-email-tarmigan+git@gmail.com> In-Reply-To: <4B4EAB58.6040901@alum.mit.edu> dash is more finicky than some shells and this change seems to make it happier. Reported-by: Michael Haggerty Signed-off-by: Tarmigan Casebolt --- Michael, thanks for the report. Ubuntu's /bin/sh is dash, which I had not tested with. Installing dash on my machine, I was able to reproduce and this patch fixes the problem for me. Could you please see if this works for you? Thanks, Tarmigan --- t/t5560-http-backend-noserver.sh | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/t/t5560-http-backend-noserver.sh b/t/t5560-http-backend-noserver.sh index 5f8c88e..f2e413d 100755 --- a/t/t5560-http-backend-noserver.sh +++ b/t/t5560-http-backend-noserver.sh @@ -10,12 +10,13 @@ run_backend() { QUERY_STRING="${1#*\?}" \ GIT_PROJECT_ROOT="$HTTPD_DOCUMENT_ROOT_PATH" \ PATH_INFO="${1%%\?*}" \ + REQUEST_METHOD="$3" \ + CONTENT_TYPE="$4" \ git http-backend >act.out 2>act.err } GET() { - REQUEST_METHOD="GET" \ - run_backend "/repo.git/$1" && + run_backend "/repo.git/$1" "" "GET" && if ! grep "Status" act.out >act then printf "Status: 200 OK\r\n" >act @@ -25,9 +26,7 @@ GET() { } POST() { - REQUEST_METHOD="POST" \ - CONTENT_TYPE="application/x-$1-request" \ - run_backend "/repo.git/$1" "$2" && + run_backend "/repo.git/$1" "$2" "POST" "application/x-$1-request" && if ! grep "Status" act.out >act then printf "Status: 200 OK\r\n" >act -- 1.6.6.376.gabe8e