aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest
AgeCommit message (Collapse)Author
2017-06-11test1521: fixed OOM handlingDan Fandrich
2017-06-09lib1521: fix compiler warnings on the use of bad 'long' valuesDaniel Stenberg
Reported-by: Marcel Raad Bug: https://github.com/curl/curl/commit/cccac4fb2b20d6ed87da7978408c3ecacc464fe4#commitcomment-22453387
2017-06-06lib1521: fix compiler warningsDaniel Stenberg
2017-06-05test1521: make the code < 80 columns wideDaniel Stenberg
2017-06-05test1121: use stricter types to work with typcheck-gccDaniel Stenberg
2017-06-05test1521: test *all* curl_easy_setopt optionsDaniel Stenberg
mk-lib1521.pl generates a test program (lib1521.c) that calls curl_easy_setopt() for every known option with a few typical values to make sure they work (ignoring the return codes). Some small changes were necessary to avoid asserts and NULL accesses when doing this. The perl script needs to be manually rerun when we add new options. Closes #1543
2017-06-03libtest: fix int-in-bool-context warningsMarcel Raad
GCC 7 complained: ‘*’ in boolean context, suggest ‘&&’ instead [-Wint-in-bool-context]
2017-06-03libtest: fix implicit-fallthrough warnings with GCC 7Marcel Raad
2017-06-02test1538: verify the libcurl strerror API callsDaniel Stenberg
2017-06-02test1537: dedicated tests of the URL (un)escape API callsDaniel Stenberg
Closes #1530
2017-05-31lib583: fix compiler warningMarcel Raad
Use CURLMcode for variable 'res' and cast to int where necessary instead of the other way around. Other tests do the same. This fixes the following clang warning: lib583.c:68:15: warning: cast from function call of type 'CURLMcode' to non-matching type 'int' [-Wbad-function-cast]
2017-05-31libtest/lib574.c: use correct callback protoDaniel Stenberg
2017-05-29test557: fix ubsan runtime error due to int left shiftJay Satiro
- Test curl_msnprintf negative int width arg using INT_MIN instead of 1 << 31 which is undefined behavior. Closes https://github.com/curl/curl/issues/1516
2017-05-24time: fix type conversions and compiler warningsMichael Kaufmann
Fix bugs and compiler warnings on systems with 32-bit long and 64-bit time_t. Reviewed-by: Daniel Stenberg Closes #1499
2017-05-13lib510: don't write past the end of the buffer if it's too smallDan Fandrich
2017-05-09tests: make test file names more uniqueDan Fandrich
Include the test number in the names of files written out by tests to reduce the chance of accidental duplication and to make it more clear which test is associated with which file.
2017-05-08libtest: fix MinGW-w64 warningsMarcel Raad
long is 32 bits while size_t is 64 bits on MinGW-w64, so typecheck-gcc.h complains when using size_t for a long option. Also, curl_socket_t is unsigned long long rather than int.
2017-05-08test537: use correct variable typeMarcel Raad
Avoids narrowing conversion warnings because rlim_t is usually unsigned long. Closes https://github.com/curl/curl/pull/1469
2017-05-05tests: fix -Wcast-qual warningsMarcel Raad
Avoid casting string literals to non-const char *.
2017-05-04test557: set a known good numeric localeDan Fandrich
Windows does not allow setting the locale with environment variables (as the test attempted to do), so the test failed when run with a user locale that has a comma as radixchar. Changed the test to call setlocale() explicitly to ensure that a known working locale is set even on Windows.
2017-05-04test559: verify use of minimum CURLOPT_BUFFERSIZEDaniel Stenberg
2017-05-01tests: declare TU-local variables staticMarcel Raad
This fixes missing-variable-declarations warnings when building with clang.
2017-04-29tests: added --remote-time tests for remaining protocols that support itDan Fandrich
2017-04-12test1541: also test for CURL_PULL_WS2TCPIP_HMarcel Raad
Ref: https://github.com/curl/curl/issues/1408 Closes https://github.com/curl/curl/pull/1412
2017-04-05test1541: ignore the curl_off_t variable type name comparisonDaniel Stenberg
... the sizes and the formatting strings are what's really important and avoids problems with int64_t vs "long long". Bug: https://curl.haxx.se/mail/lib-2017-04/0019.html
2017-04-03include: curl/system.h is a run-time version of curlbuild.hDaniel Stenberg
system.h is aimed to replace curlbuild.h at a later point in time when we feel confident system.h works sufficiently well. curl/system.h is currently used in parallel with curl/curlbuild.h curl/system.h determines a data sizes, data types and include file status based on available preprocessor defines instead of getting generated at build-time. This, in order to avoid relying on a build-time generated file that makes it complicated to do 32 and 64 bit bields from the same installed set of headers. Test 1541 verifies that system.h comes to the same conclusion that curlbuild.h offers. Closes #1373
2017-03-28pause: handle mixed types of data when pausedDaniel Stenberg
When receiving chunked encoded data with trailers, and the write callback returns PAUSE, there might be both body and header to store to resend on unpause. Previously libcurl returned error for that case. Added test case 1540 to verify. Reported-by: Stephen Toub Fixes #1354 Closes #1357
2017-03-26spelling fixesklemens
Closes #1356
2017-03-14build: removed redundant DEPENDENCIES from makefilesDan Fandrich
2017-03-11tests: fix the authretry testsMichael Kaufmann
Do not call curl_easy_reset() between the requests, because the auth state must be preserved for these tests. Follow-up to 0afbcfd
2017-02-07test552: Fix typosDaniel Gustafsson
Closes https://github.com/curl/curl/pull/1245
2017-01-08lib506: fix build for Open WatcomJiří Malák
Rename symbol lock to locks to not clash with OW CRTL function name. Closes #1196
2016-12-22lib557.c: use a shorter MAXIMIZE representationDaniel Stenberg
Since several compilers had problems with the previous one Reported-by: Ray Satiro Bug: https://curl.haxx.se/mail/lib-2016-12/0098.html
2016-12-21lib557: move the "enable LONGLINE" to allow more long linesDaniel Stenberg
This file is riddled with them...
2016-12-19tests: checksrc complianceJay Satiro
2016-12-19printf: fix floating point buffer overflow issuesDaniel Stenberg
... and add a bunch of floating point printf tests
2016-12-18curl_easy_recv: Improve documentation and example programMichael Kaufmann
Follow-up to 82245ea: Fix the example program sendrecv.c (handle CURLE_AGAIN, handle incomplete send). Improve the documentation for curl_easy_recv() and curl_easy_send(). Reviewed-by: Frank Meier Assisted-by: Jay Satiro See https://github.com/curl/curl/pull/1134
2016-12-14checksrc: warn for assignments within if() expressionsDaniel Stenberg
... they're already frowned upon in our source code style guide, this now enforces the rule harder.
2016-12-13checksrc: stricter no-space-before-paren enforcementDaniel Stenberg
In order to make the code style more uniform everywhere
2016-11-28lib1536: checksrc complianceJay Satiro
2016-11-26tests: Add some testcases for recent new features.Frank Gevaerts
Add missing tests for CURLINFO_SCHEME, CURLINFO_PROTOCOL, %{scheme}, and %{http_version} closes #1143
2016-11-24checksrc: move open braces to comply with function declaration styleDaniel Stenberg
2016-11-24checksrc: white space edits to comply to stricter checksrcDaniel Stenberg
2016-11-24checksrc: code style: use 'char *name' styleDaniel Stenberg
2016-11-07s/cURL/curlDaniel Stenberg
We're mostly saying just "curl" in lower case these days so here's a big cleanup to adapt to this reality. A few instances are left as the project could still formally be considered called cURL.
2016-11-05easy: Initialize info variables on easy init and duphandleJay Satiro
- Call Curl_initinfo on init and duphandle. Prior to this change the statistical and informational variables were simply zeroed by calloc on easy init and duphandle. While zero is the correct default value for almost all info variables, there is one where it isn't (filetime initializes to -1). Bug: https://github.com/curl/curl/issues/1103 Reported-by: Neal Poole
2016-10-31libauthretry: use the external function curl_strequalDan Fandrich
The internal version strcasecompare isn't available outside libcurl
2016-10-31strcasecompare: is the new name for strequal()Daniel Stenberg
... to make it less likely that we forget that the function actually does case insentive compares. Also replaced several invokes of the function with a plain strcmp when case sensitivity is not an issue (like comparing with "-").
2016-10-31parsedate: handle cut off numbers betterDaniel Stenberg
... and don't read outside of the given buffer! CVE-2016-8621 bug: https://curl.haxx.se/docs/adv_20161102G.html Reported-by: Luật Nguyễn
2016-10-08test557: verify printf() with 128 and 129 argumentsDaniel Stenberg