rewrite git_config() to use the config-set API
[gitweb.git] / t / t5550-http-fetch-dumb.sh
index 1a3a2b6c1a20558a019143d1abbd2168af0caf53..ac71418a1b26bc17a1252d6831869b96a8d8c176 100755 (executable)
@@ -171,5 +171,30 @@ test_expect_success 'did not use upload-pack service' '
        test_cmp exp act
 '
 
+test_expect_success 'git client shows text/plain errors' '
+       test_must_fail git clone "$HTTPD_URL/error/text" 2>stderr &&
+       grep "this is the error message" stderr
+'
+
+test_expect_success 'git client does not show html errors' '
+       test_must_fail git clone "$HTTPD_URL/error/html" 2>stderr &&
+       ! grep "this is the error message" stderr
+'
+
+test_expect_success 'git client shows text/plain with a charset' '
+       test_must_fail git clone "$HTTPD_URL/error/charset" 2>stderr &&
+       grep "this is the error message" stderr
+'
+
+test_expect_success 'http error messages are reencoded' '
+       test_must_fail git clone "$HTTPD_URL/error/utf16" 2>stderr &&
+       grep "this is the error message" stderr
+'
+
+test_expect_success 'reencoding is robust to whitespace oddities' '
+       test_must_fail git clone "$HTTPD_URL/error/odd-spacing" 2>stderr &&
+       grep "this is the error message" stderr
+'
+
 stop_httpd
 test_done