summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-06-19 09:31:37 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-06-19 09:31:37 +0200
commit0e3830ee5035afc7b55f321c4b46944bf9926782 (patch)
treea955a60be462f611610ba15888f35fd80196ac33
parent2d9b3b88910bd7365a50361b3f85fc7bae1a02bd (diff)
downloadcurl-bagder/test1521-add-getinfo.tar.gz
test1521: test getinfo's OFF_T types toobagder/test1521-add-getinfo
-rw-r--r--tests/libtest/lib1521.c19
-rw-r--r--tests/libtest/mk-lib1521.pl4
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/libtest/lib1521.c b/tests/libtest/lib1521.c
index de68e7a74..15dee2855 100644
--- a/tests/libtest/lib1521.c
+++ b/tests/libtest/lib1521.c
@@ -118,6 +118,7 @@ int test(char *URL)
struct data object;
char *charp;
long val;
+ curl_off_t oval;
double dval;
curl_socket_t sockfd;
struct curl_certinfo *certinfo;
@@ -2335,15 +2336,27 @@ int test(char *URL)
res = curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD, &dval);
if(UNEX(res)) {
geterr("SIZE_UPLOAD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD_T, &oval);
+ if(UNEX(res)) {
+ geterr("SIZE_UPLOAD_T", res, __LINE__); goto test_cleanup; }
res = curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD, &dval);
if(UNEX(res)) {
geterr("SIZE_DOWNLOAD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD_T, &oval);
+ if(UNEX(res)) {
+ geterr("SIZE_DOWNLOAD_T", res, __LINE__); goto test_cleanup; }
res = curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD, &dval);
if(UNEX(res)) {
geterr("SPEED_DOWNLOAD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD_T, &oval);
+ if(UNEX(res)) {
+ geterr("SPEED_DOWNLOAD_T", res, __LINE__); goto test_cleanup; }
res = curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD, &dval);
if(UNEX(res)) {
geterr("SPEED_UPLOAD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD_T, &oval);
+ if(UNEX(res)) {
+ geterr("SPEED_UPLOAD_T", res, __LINE__); goto test_cleanup; }
res = curl_easy_getinfo(curl, CURLINFO_HEADER_SIZE, &val);
if(UNEX(res)) {
geterr("HEADER_SIZE", res, __LINE__); goto test_cleanup; }
@@ -2359,9 +2372,15 @@ int test(char *URL)
res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &dval);
if(UNEX(res)) {
geterr("CONTENT_LENGTH_DOWNLOAD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &oval);
+ if(UNEX(res)) {
+ geterr("CONTENT_LENGTH_DOWNLOAD_T", res, __LINE__); goto test_cleanup; }
res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_UPLOAD, &dval);
if(UNEX(res)) {
geterr("CONTENT_LENGTH_UPLOAD", res, __LINE__); goto test_cleanup; }
+ res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_UPLOAD_T, &oval);
+ if(UNEX(res)) {
+ geterr("CONTENT_LENGTH_UPLOAD_T", res, __LINE__); goto test_cleanup; }
res = curl_easy_getinfo(curl, CURLINFO_STARTTRANSFER_TIME, &dval);
if(UNEX(res)) {
geterr("STARTTRANSFER_TIME", res, __LINE__); goto test_cleanup; }
diff --git a/tests/libtest/mk-lib1521.pl b/tests/libtest/mk-lib1521.pl
index 87b2f3092..95c7135db 100644
--- a/tests/libtest/mk-lib1521.pl
+++ b/tests/libtest/mk-lib1521.pl
@@ -149,6 +149,7 @@ int test(char *URL)
struct data object;
char *charp;
long val;
+ curl_off_t oval;
double dval;
curl_socket_t sockfd;
struct curl_certinfo *certinfo;
@@ -255,6 +256,9 @@ while(<STDIN>) {
elsif($type eq "LONG") {
print "$c &val);\n$check";
}
+ elsif($type eq "OFF_T") {
+ print "$c &oval);\n$check";
+ }
elsif($type eq "DOUBLE") {
print "$c &dval);\n$check";
}