Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/t5561-http-backend.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / t5561-http-backend.sh` 138 lines ยท 4130 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='test git-http-backend' 4 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 5 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 6 7 . ./test-lib.sh 8 . "$TEST_DIRECTORY"/lib-httpd.sh 9 10 if ! test_have_prereq CURL; then 11 skip_all='skipping raw http-backend tests, curl not available' 12 test_done 13 fi 14 15 start_httpd 16 17 GET() { 18 curl --include "$HTTPD_URL/$SMART/repo.git/$1" >out && 19 tr '\015' Q act && 24 echo "HTTP/1.1 $2" >exp && 25 test_cmp exp act 26 } 27 28 POST() { 29 curl --include --data "$2" \ 30 --header "Content-Type: application/x-$1-request" \ 31 "$HTTPD_URL/smart/repo.git/$1" >out && 32 tr '\015' Q act && 37 echo "HTTP/1.1 $3" >exp && 38 test_cmp exp act 39 } 40 41 . "$TEST_DIRECTORY"/t556x_common 42 43 grep '^[^#]' >exp <