aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest
AgeCommit message (Collapse)Author
2018-02-15TODO fixed: Detect when called from within callbacksBjörn Stenberg
Closes #2302
2018-01-26lib555: drop text conversion and encode data as ascii codesPatrick Monnerat
If CURL_DOES_CONVERSION is enabled, uploaded LFs are mapped to CRLFs, giving a result that is different from what is expected. This commit avoids using CURLOPT_TRANSFERTEXT and directly encodes data to upload in ascii. Bug: https://github.com/curl/curl/pull/1872
2018-01-26lib517: make variable static to avoid compiler warningDaniel Stenberg
... with clang on macos
2018-01-26lib544: sync ascii code data with textual dataPatrick Monnerat
Data mismatch caused test 545 to fail when character encoding conversion is enabled. Bug: https://github.com/curl/curl/pull/1872
2018-01-25parsedate: fix date parsing for systems with 32 bit longDaniel Stenberg
Make curl_getdate() handle dates before 1970 as well (returning negative values). Make test 517 test dates for 64 bit time_t. This fixes bug (3) mentioned in #2238 Closes #2250
2018-01-14mime: clone mime tree upon easy handle duplication.Patrick Monnerat
A mime tree attached to an easy handle using CURLOPT_MIMEPOST is strongly bound to the handle: there is a pointer to the easy handle in each item of the mime tree and following the parent pointer list of mime items ends in a dummy part stored within the handle. Because of this binding, a mime tree cannot be shared between different easy handles, thus it needs to be cloned upon easy handle duplication. There is no way for the caller to get the duplicated mime tree handle: it is then set to be automatically destroyed upon freeing the new easy handle. New test 654 checks proper mime structure duplication/release. Add a warning note in curl_mime_data_cb() documentation about sharing user data between duplicated handles. Closes #2235
2018-01-07scripts: allow all perl scripts to be run directlyJay Satiro
- Enable execute permission (chmod +x) - Change interpreter to /usr/bin/env perl Closes https://github.com/curl/curl/pull/2222
2018-01-05build: remove HAVE_LIMITS_H checkJay Satiro
.. because limits.h presence isn't optional, it's required by C89. Ref: http://port70.net/~nsz/c/c89/c89-draft.html#2.2.4.2 Closes https://github.com/curl/curl/pull/2215
2017-12-30test1554: improve the error handlingMichael Kaufmann
2017-12-30test1554: add global initialization and cleanupMichael Kaufmann
2017-12-10tests: update .gitignore for libtestsMichael Kaufmann
2017-12-01lib582: do not verify host for SFTPNikos Mavrogiannopoulos
This SFTP test fails with libssh back-end due to failure to verify the peer. Disable peer verification in the test as there seems to be the intention of the test. Note that the libssh back-end automatically verifies the peer's host using the default known_hosts file. Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2017-11-09test1554: verify connection cache sharingDaniel Stenberg
2017-11-01tests: Fixed torture tests on tests 556 and 650Dan Fandrich
Test cleanup after OOM wasn't being consistently performed.
2017-11-01CURLOPT_MAXREDIRS: allow -1 as a valueDaniel Stenberg
... which is valid according to documentation. Regression since f121575c0b5f. Verified now in test 501. Reported-by: cbartl on github Fixes #2038 Closes #2039
2017-10-24libtest: Add required test libraries for lib1552 and lib1553Paul Howarth
They use $(TESTUTIL) and thus should use $(TESTUTIL_LIBS) too. This fixes build failures on Fedora 13. Closes #2006
2017-10-20test653: check reuse of easy handle after mime data changePatrick Monnerat
See issue #1999
2017-10-19test652: curl_mime_data + base64 encoder with large contentsPatrick Monnerat
2017-10-13test651: curl_formadd with huge COPYCONTENTSDaniel Stenberg
2017-10-12mime: keep "text/plain" content type if user-specified.Patrick Monnerat
Include test cases in 554, 587, 650. Fixes https://github.com/curl/curl/issues/1986
2017-10-08test643: verify curl_mime_subparts() rejects cyclic additions.Patrick Monnerat
2017-10-07pingpong: return error when trying to send without connectionDaniel Stenberg
When imap_done() got called before a connection is setup, it would try to "finish up" and dereffed a NULL pointer. Test case 1553 managed to reproduce. I had to actually use a host name to try to resolve to slow it down, as using the normal local server IP will make libcurl get a connection in the first curl_multi_perform() loop and then the bug doesn't trigger. Fixes #1953 Assisted-by: Max Dymond
2017-10-06multi_cleanup: call DONE on handles that never got thatDaniel Stenberg
... fixes a memory leak with at least IMAP when remove_handle is never called and the transfer is abruptly just abandoned early. Test 1552 added to verify Detected by OSS-fuzz Assisted-by: Max Dymond Closes #1954
2017-09-24tests: adjust .gitignore for new testsMichael Kaufmann
2017-09-23tests: fix a compiler warning in test 643Michael Kaufmann
2017-09-22form/mime: field names are not allowed to contain zero-valued bytes.Patrick Monnerat
Also suppress length argument of curl_mime_name() (names are always zero-terminated).
2017-09-15tests: add initial gssapi test using stub implementationIsaac Boukris
The stub implementation is pre-loaded using LD_PRELOAD and emulates common gssapi uses (only builds if curl is initially built with gssapi support). The initial tests are currently disabled for debug builds as LD_PRELOAD is not used then. Ref: https://github.com/curl/curl/pull/1687
2017-09-12code style: use space after semicolonDaniel Stenberg
2017-09-11code style: use spaces around plusesDaniel Stenberg
2017-09-11code style: use spaces around equals signsDaniel Stenberg
2017-09-07form API: add new test 650.Patrick Monnerat
Now that the form API is deprecated and not used anymore in curl tool, a lot of its features left untested. Test 650 attempts to check all these features not tested elsewhere.
2017-09-03mime: fix signed/unsigned conversions.Patrick Monnerat
Use and generate CURL_ZERO_TERMINATED in curl tool and tests.
2017-09-02mime: tests and examples.Patrick Monnerat
Additional mime-specific tests. Existing tests updated to reflect small differences (Expect: 100-continue, data size change due to empty lines, etc). Option -F headers= keyword added to tests. test1135 disabled until the entry point order change is resolved. New example smtp-mime. Examples postit2 and multi-post converted from form API to mime API.
2017-09-02mime: new MIME API.Patrick Monnerat
Available in HTTP, SMTP and IMAP. Deprecates the FORM API. See CURLOPT_MIMEPOST. Lib code and associated documentation.
2017-08-26tests: Make sure libtests & unittests call curl_global_cleanup()Dan Fandrich
These were missed in commit c468c27b.
2017-08-19tests: Make sure libtests call curl_global_cleanup()Dan Fandrich
This ensures that global data allocations are freed so Valgrind stays happy. This was a problem with at least PolarSSL and mbedTLS.
2017-08-17lib557: no longer use CURL_SIZEOF_* definesDaniel Stenberg
2017-07-16libtest: fix MSVC warning C4706Marcel Raad
With warning level 4, MSVC warns about assignments within conditional expressions. Change the while loop to a do-while loop to fix this. This change is also consistent with CODE_STYLE.md.
2017-07-11strerror: Preserve Windows error code in some functionsJay Satiro
This is a follow-up to af02162 which removed (SET_)ERRNO macros. That commit was an earlier draft that I committed by mistake, which was then remedied by a5834e5 and e909de6, and now this commit. With this commit there is now no difference between the current code and the changes that were approved in the final draft. Thanks-to: Max Dymond, Marcel Raad, Daniel Stenberg, Gisle Vanem Ref: https://github.com/curl/curl/pull/1589
2017-07-10tests: Fix up issues with errno in test filesMax Dymond
Closes https://github.com/curl/curl/pull/1671
2017-07-03url: make the original string get used on subsequent transfersDaniel Stenberg
... since CURLOPT_URL should follow the same rules as other options: they remain set until changed or cleared. Added test 1551 to verify. Fixes #1631 Closes #1632 Reported-by: Pavel Rochnyak
2017-06-30test1521: fix out-of-tree builds, broken with 467da3afDan Fandrich
The test.h file is no longer in the same directory as the source file, so that directory needs to be added to the include path. Fixes #1627 Closes #1628
2017-06-27libtest/make: generate lib1521.cDaniel Stenberg
... instead of having the generated code checked in. This saves space in the tarball but primarily automatically adapts to newly added options. Closes #1614
2017-06-25test1537: fixed memory leak on OOMDan Fandrich
2017-06-25test1521: fix compiler warningsMarcel Raad
The integer literal 3123123123 doesn't fit into a 32-bit signed integer, so GCC with 32-bit long warns in C90 mode: this decimal constant is unsigned only in ISO C90 [enabled by default] Fix this by using ULONG_MAX, which should fit in any curl_off_t and has the correct suffix to not issue any warnings. Also adds the missing CURLOPT_REQUEST_TARGET from commit 9b167fd090f596eac828817d48c247eeae53407f. Closes https://github.com/curl/curl/pull/1611
2017-06-23libtest/Makefile: remove unused lib1541 variablesDaniel Stenberg
2017-06-21lib1521: fix missing-variable-declarations clang warningsMarcel Raad
Declare TU-local variables static.
2017-06-19test1521: test getinfo's OFF_T types tooDaniel Stenberg
Closes #1588
2017-06-19lib1521: add curl_easy_getinfo calls to the test setDaniel Stenberg
Also added return value checks to make sure no unexpected return codes are used.
2017-06-19PIPELINING_SERVER_BL: cleanup the internal list useDaniel Stenberg
The list was freed incorrectly since the llist refactor of cbae73e1dd959. Added test 1550 to verify that it works and avoid future regressions. Reported-by: Pascal Terjan Fixes #1584 Closes #1585