Commit Graph

628 Commits

Author SHA1 Message Date
769dc861fc * tests/valgrind-suppressions: Drop libgpgme version from suppression 2024-05-21 13:56:10 +02:00
570a022fd2 * tests/Makefile.am: Add suppression files 2024-05-21 13:56:02 +02:00
e8f1e99c96 Accept --progress=dot:... for backwards compatibility
* src/options.c (parse_progress_type): Fix checking dot options.
* tests/test-wget-1.c: Add check for --progress variants.
2024-05-20 13:19:15 +02:00
b5dc13759d * tests/libtest.c: Fix two memleaks 2024-05-19 13:18:19 +02:00
24419cd330 * tests/libtest.c: Remove superfluous casts 2024-05-18 19:26:37 +02:00
715e646642 Fix tests/test-ocsp-server
* tests/libtest.c: Handle > 1 OCSP responses.
* tests/libtest.h: Rename WGET_TEST_OCSP_RESP_FILE to WGET_TEST_OCSP_RESP_FILES.
* tests/test-ocsp-server.c: Make use of WGET_TEST_OCSP_RESP_FILES.
2024-05-12 19:51:44 +02:00
329d1282ca Limit cases where methods are redirected to GET
* tests/test-spider-r.c: Add new test for redirections with spider
* src/wget.c(process_response_header): Prevent changing the request
  method during a redirection to GET.

Fixes: #660
2024-04-29 19:54:14 +02:00
d55ecc7113 Update gnulib link libraries
* fuzz/Makefile.am: Update gnulib link libraries.
* libwget/Makefile.am: Likewise.
* src/Makefile.am: Likewise.
* tests/Makefile.am: Likewise.
* unit-tests/Makefile.am: Likewise.
2024-03-24 15:58:27 +01:00
1bb48422fd Skip failing OCSP tests with WolfSSL
* tests/test-ocsp-server.c: Skip failing tests.
* tests/test-ocsp-stap.c: Likewise.
2024-03-23 16:03:54 +01:00
a4f368e5b5 tests/test-page-requisites.c: Add HTML source/srcset to tests 2024-01-27 18:39:35 +01:00
ae1decb981 * tests/test-timestamping.c: Pass correct type to variadic function 2024-01-14 16:54:33 +00:00
188989e067 Update copyright year 2024-01-07 12:41:02 +01:00
0415d036b3 Fix minor typos in comments 2023-11-04 14:36:43 +01:00
15ba1db248 Update copyrights 2023-08-31 12:57:30 +02:00
3fb56d60ff Fix parsing HTMP/XML entities in URLs from HTML/XML
* libwget/xml.c (wget_xml_decode_entities_inline): Fix decoding of &#dddd; and &#xhhhh;.
* tests/test-base.c (main): Add test case for &#dddd; and &#xhhhh;.

Reported-by: Michael Roosz
2023-08-27 20:38:17 +02:00
dad7aaa868 * tests/test-timestamping.c: Replace VLA 2023-07-31 18:19:18 +02:00
1ba0dfc383 * tests/test-include-and-exclude-directories.c: Replace VLA 2023-07-31 18:19:18 +02:00
471ba2bd2e * tests/test-metalink.c: Replace VLA 2023-07-31 18:19:18 +02:00
b33a61a67e * tests/libtest.c: Replace VLA 2023-07-29 19:01:21 +02:00
bcef2ad0ca tests/libtest.c (wget_test): Don't use backslash in path for MINGW32 2023-07-08 12:17:17 +02:00
b50bce35be * tests/test-parse-css.c (main): Add data url to test 2023-05-28 18:00:02 +02:00
261d05e082 Decode numeric XML entities
* libwget/xml.c (wget_xml_decode_entities_inline): Decode numeric entities.
* tests/test-base.c (main): Add test.
2022-12-02 13:00:06 +01:00
dcad432329 * tests/valgrind-suppressions: Suppress memleak in gpgme_data_new_from_mem() 2022-08-14 14:48:50 +02:00
7f2db0c398 Fix status code for 5xx errors
* src/wget.c (process_response_header): Set EXIT_STATUS_REMOTE on 5xx.
* tests/test-i-https.c: New test to check 503 behavior.
* tests/test-wget-1.c: Likewise.
2022-07-01 18:19:42 +02:00
0ed4616ad0 Refactor and fix code formatting
* libwget/vector.c: Refactor
* libwget/xml.c: Refactor
* tests/test-include-and-exclude-directories.c: Refactor
* tests/libtest.c: Fix code formatting
2022-06-25 14:09:39 +02:00
7292244bec Add tests for --level
* tests/Makefile.am: Add test-level.c.
* tests/test-level.c: New file with tests for --level.
2022-04-03 14:52:36 +02:00
4a24762773 * tests/test-robots.c (main): Add a test for --no-robots 2022-04-03 13:16:55 +02:00
0f554ef216 * */Makefile.am: Reorder link libraries (libgnu.la first) 2022-03-05 16:23:15 +01:00
336a22b1ac Fix copyright statements 2022-02-25 17:56:49 +01:00
3dc7f71098 Update copyright year 2022-02-25 17:46:43 +01:00
be4e2deaf9 Fix -k/--convert-links fragment
* src/wget.c (convert_link_file_only): Use wget_debug_printf instead of wget_info_printf,
  (convert_links): Add fragment.
* tests/test-k.c: Add fragment to test.
2022-02-20 19:05:46 +01:00
72f48aaa1f Properly escape URLs with -k/--convert-links
* src/wget.c (convert_link_whole): Use wget_iri_escape_path() instead of wget_buffer_strcat().
* tests/test-k.c (main): Add test of URL with query part including escaped characters.
2022-02-20 18:32:54 +01:00
954c3c19b6 * tests/test--*.c: Rename to test-*.c 2022-02-19 18:44:50 +01:00
66d24458d0 Fix --directory-prefix with --content-disposition
* src/blacklist.c (get_local_filename): Remove static from definition.
* src/wget_blacklist.h (get_local_filename): Add declaration.
* src/wget.c (process_response): Use get_local_filename() to process
  the filename from Content-Disposition,
  (get_header): Likewise.
* tests/Makefile.am: Add new test file test-directory-prefix.c.
* tests/test-directory-prefix.c: New test file.
2022-02-18 19:57:14 +01:00
c5e393f818 * tests/valgrind-suppressions: Suppress glibc false positive in dynnamic loading 2022-01-01 18:42:06 +01:00
974d1f1dbc * tests/libtest.c (wget_test): Add --gen-suppressions=all to valgrind options 2022-01-01 18:41:23 +01:00
1d260ecfef Add support for unquoted HTML attribute values
* libwget/xml.c (getHTMLValue): New function.
  (getValue): Call getHTMLValue if parsing HTML.
* tests/test-base.c: Use an unquoted HREF value to trigger the new code.
2022-01-01 17:55:36 +01:00
b3582cccdc * tests/libtest.c: Replace gnutls_free() with free()
I did this after having issues to build a static MinGW Wget2.exe.
gnutls_free() was not properly exported by libgnutls.a.
2021-10-31 15:25:42 +01:00
5dedff4c42 * tests/test--page-requisites.c: Add tests for new rel parsing 2021-08-08 09:56:14 +02:00
1358405061 Fix building without TLS library
This changes configure semantics to fail if no TLS library
is found and no --with-ssl=none was explicitly requested.
It protects users from accidentally building without TLS.

* .gitlab-ci.yml: Tarball build using --with-ssl=none.
* configure.ac: Stop with error if no TLS was found and --with-ssl
  was not used.
* tests/libtest.c: Fix issues with conditionally declared variables.
2021-02-07 12:34:39 +01:00
d123cb89a7 * tests/test-ocsp-server.c: Skip cert revocation check for WolfSSL 2021-02-06 19:47:02 +01:00
39a5e91407 * tests/test-post-handshake-auth.c (main.c): Fix warning when building with non-gnutls libraries 2021-02-06 19:47:02 +01:00
258506ce85 Separate GnuTLS in wget2 and in test suite
* configure.ac: Separate GnuTLS in wget2 and in test suite.
* tests/libtest.c: Use WITH_GNUTLS_OCSP insteadof WITH_OCSP.
2021-02-06 19:47:02 +01:00
420c5672e0 * tests/test-chunked.c: Extend test with hand-crafted chunked pattern 2021-01-31 19:21:59 +01:00
22162f82b2 Update copyright year 2021-01-22 21:58:38 +01:00
280f74c4b3 Fix combination of redirections with --retry-on-http-error
* src/wget.c: Move some code logic around.
* tests/test-interrupt-response.c: Correct expected wget2 exit status.
* tests/test-redirection.c: Add tests for --retry-on-http-error.

Reported-by: Sergei Litvin
2020-12-27 14:37:11 +01:00
f8427fa1af * tests/libtest.c (wget_test): Add --tries=1 to wget2 command line 2020-12-27 11:28:32 +01:00
e584b0052b * tests/libtest.c (wget_test_start_server): Fix warning 'break will never be executed' 2020-12-25 19:02:41 +01:00
3a9401a62a * tests/libtest.c (wget_test_start_server): Fix unused variable warning 2020-12-25 19:00:42 +01:00
cc19fdf5c4 Fix findings from scan-build 11
* tests/libtest.c (_parse_hostname): Fix += into +.
  (_answer_to_connection): Limit scope of body_len.
2020-12-20 17:13:00 +01:00