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/t5557-http-get.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 / t5557-http-get.sh` 38 lines ยท 716 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='test downloading a file by URL' 4 5 6 . ./test-lib.sh 7 8 . "$TEST_DIRECTORY"/lib-httpd.sh 9 start_httpd 10 11 test_expect_success 'get by URL: 404' ' 12 test_when_finished "rm -f file.temp" && 13 url="$HTTPD_URL/none.txt" && 14 cat >input <<-EOF && 15 capabilities 16 get $url file1 17 EOF 18 19 test_must_fail git remote-http $url err && 20 test_path_is_missing file1 && 21 test_grep "failed to download file at URL" err 22 ' 23 24 test_expect_success 'get by URL: 200' ' 25 echo data >"$HTTPD_DOCUMENT_ROOT_PATH/exists.txt" && 26 27 url="$HTTPD_URL/exists.txt" && 28 cat >input <<-EOF && 29 capabilities 30 get $url file2 31 32 EOF 33 34 git remote-http $url