diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-05-20 14:22:08 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-05-20 14:24:12 -0700 |
commit | e948380c2a28f12e7210130bc83fb0ae0e6fcac9 (patch) | |
tree | 61374a5025270d2c30db025d8ca34000fb3d19ab /t/test-lib.sh | |
parent | bfe34128aed4ec696bb939c19e86a742297af830 (diff) | |
download | rainbows-e948380c2a28f12e7210130bc83fb0ae0e6fcac9.tar.gz |
curl < 7.18.0 did not check for errors when doing chunked uploads. Unfortunately some distros are slow moving and bundle ancient versions of curl.
Diffstat (limited to 't/test-lib.sh')
-rw-r--r-- | t/test-lib.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index cdeff39..dc6eed7 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -162,6 +162,21 @@ rsha1 () { expr "$($_cmd)" : '\([a-f0-9]\{40\}\)' } +req_curl_chunked_upload_err_check () { + set +e + curl --version 2>/dev/null | awk '$1 == "curl" { + split($2, v, /\./) + if ((v[1] < 7) || (v[1] == 7 && v[2] < 18)) + code = 1 + } + END { exit(code) }' + if test $? -ne 0 + then + t_info "curl >= 7.18.0 required for $T" + exit 0 + fi +} + case $model in Rev) require_check rev Rev::VERSION ;; Revactor) require_check revactor Revactor::VERSION ;; |