Commit Graph

60 Commits

Author SHA1 Message Date
15ba1db248 Update copyrights 2023-08-31 12:57:30 +02:00
3dc7f71098 Update copyright year 2022-02-25 17:46:43 +01:00
22162f82b2 Update copyright year 2021-01-22 21:58:38 +01:00
42461e5313 Added test simulations of aborts while sending response body
* tests/Makefile.am: add tests/test-interrupt-response test
* tests/libtest.c (_callback_interruptable, _answer_to_connection):
  add interruptable response callback, enable in wget_test_url_t
  settings
* tests/libtest.h: added interrupt_response_mode and
  interrupt_response_after_nbytes to wget_test_url_t
* tests/test-interrupt-response.c: add test for interruptable
  responses and interrupt of responses while timestamping active
2020-01-31 19:19:45 +01:00
59d9ecd9c0 * Update copyright year to 2020 2020-01-10 00:33:02 +01:00
80eba1c1e6 Add wget_test_set_executable() to test suite
* tests/libtest.h: Add declaration of wget_test_set_executable()
* tests/libtest.c: Add definition of wget_test_set_executable(),
  add global variable 'global_executable',
  (wget_test): Use 'global_executable' to initialize 'executable',
  (wget_test): Use 'executable' if set
2019-10-27 20:17:10 +01:00
fc62c2f4b9 Add method check for test suite
* tests/libtest.h: Add expected_method to wget_test_url_t
* tests/libtest.c (_answer_to_connection): Check method against expected_method
2019-10-27 19:24:28 +01:00
77c3c33ec8 Use int64_t for time_t to fix 32bit time_t limitations
* include/wget/wget.h: Use int64_t instead of time_t
* libwget/hpkp.c: Likewise
* libwget/hsts.c: Likewise
* libwget/http_parse.c: Likewise
* libwget/ocsp.c: Likewise
* libwget/ssl_gnutls.c: Likewise
* libwget/tls_session.c: Likewise
* src/options.c: Likewise
* src/stats_site.c: Likewise
* src/wget.c: Likewise
* tests/libtest.c: Likewise
* tests/libtest.h: Likewise
* tests/test-plugin-dummy.c: Likewise
* unit-tests/test.c: Likewise
2019-09-23 21:17:38 +02:00
758b038b61 Add new wget_test() option WGET_TEST_CLEAN_DIRECTORY
* tests/libtest.c: Implement WGET_TEST_CLEAN_DIRECTORY
* tests/libtest.h: Add WGET_TEST_CLEAN_DIRECTORY
2019-09-17 12:51:02 +02:00
595e78c83b Remove gettext support in tests/
* tests/libtest.h: Remove gettext support entirely
* tests/test-iri-subdir.c: Needs the string.h header
* tests/test-limit-rate-http2.c: Same
* tests/test-limit-rate.c: Same
* tests/test-metalink.c: Same
* tests/gpg-test-util.h: Same
* tests/test-gpg-save-failed.c: Same
* tests/test-include-and-exclude-directories.c: Same
2019-09-11 15:41:55 +02:00
4b9edbad2d Update Copyright statements to be compatible with update-copyright module 2019-09-10 23:41:56 +02:00
08307016d3 * tests/test--https-enforce-hard2.c: Allow error code 4 and 5 2019-08-21 21:46:21 +02:00
9c1be02e6b Add WGET_TEST_HTTP_REJECT_CONNECTIONS to test suite
* tests/libtest.h: Add WGET_TEST_HTTP_REJECT_CONNECTIONS
* tests/libtest.c: Implement WGET_TEST_HTTP_REJECT_CONNECTIONS
2019-08-21 21:46:21 +02:00
12f1a03693 Changed G_GNUC_WGET prefix to WGET_GCC
* include/wget/wget.h: Changed G_GNUC_WGET prefix to WGET_GCC
* */*.[ch]: Likewise
2019-08-08 17:13:24 +02:00
03acf17419 Adding support for running both http/1.1 and h2 tests
* configure.ac: Modified to have check for availability of MHD-http2
* tests/libtest.c: Modified to run both protocols on existing tests
* tests/libtest.h: Added macros for h2 and modified wget_test_url_t data structure
2019-07-29 19:18:06 +00:00
043e650829 Added skeleton OCSP Stapling
* tests/Makefile.am: Added test-ocsp-stap
* tests/libtest.c: Added an MHD daemon to send OCSP stapled response
* tests/libtest.h: Added macro WGET_TEST_FEATURE_OCSP_STAPLING
* tests/test-ocsp-stap.c: Added test for OCSP stapling
2019-07-24 17:23:01 +05:30
42be0c743e Added OCSP Responder to the test library
* tests/libtest.c: Added the skeleton responder
* tests/libtest.h: Added required macros and function prototype
2019-07-23 22:50:14 +05:30
bd79450c7a Add new option --unlink
* bootstrap.conf: Add gnulib module 'link'
* docs/wget2.md: Remove the 'unimplemented' tag for --unlink
* src/options.c: Add --unlink option
* src/wget.c (_prepare_file): Unlink file if requested
* src/wget_options.h (struct config): Add 'unlink' member
* tests/Makefile.am: Add test-unlink
* tests/libtest.c (wget_test): Implement hardlink feature
* tests/libtest.h (wget_test_file_t): Add 'hardlink' member
* tests/test-unlink.c: New file with tests for --unlink
2019-04-30 12:52:29 +02:00
9ea3e80fbf Add TLS 1.3 post-handshake authentication
* tests/Makefile.am: Loading post-handshake-auth test
* tests/libtest.c:
Added execution of 'WGET_TEST_POST_HANDSHAKE_AUTH' key.
Value: other than 0 (Check for post handshake authentication)
Value: 0 (Don't check)
* tests/libtest.h: Defined 'WGET_TEST_POST_HANDSHAKE_AUTH'
* tests/test-post-handhshake-auth.c: Added to test post handshake authentication support
2019-04-25 16:11:17 +05:30
cdb3600791 Update copyrigght to 2019 2019-01-02 12:42:53 +01:00
3688ffb941 Update copyright to 2018 2018-04-30 20:52:11 +02:00
ff855298cc Add --[no-]compression=TYPE
* src/options.c: Add compression option support
* src/wget.c: Generate 'Accept-Encoding' headers accordingly
* src/wget_options.h: Add compression variables
* libwget/decompressor.c: Add xz and "none" types
* include/wget/wget.h: Add xz types
* docs/wget2.md: Add compression option document
* tests/Makefile.am: Add compression test
* tests/libtest.c: Add request header test support
* tests/libtest.h: Add request header test support
* tests/test-compression.c: Add compression test
2018-04-11 18:23:13 +08:00
8230641958 Support binary content in test suite
* tests/libtest.h (wget_test_file_t): Add content_length member
* tests/libtest.c (_answer_to_connection): Support content_length member
2018-03-02 10:21:19 +00:00
39cdc23f4f Fix header guards
* include/wget/wget.h: Likewise
* include/wget/wgetver.h.in: Likewise
* libwget/*.h: Likewise
* src/*.h: Likewise
* tests/libtest.h: Likewise

Header guards should not start with _.
Private headers now reflect the path within the project.
The two public headers reflect the releative install directory.
2018-03-02 10:53:20 +01:00
cb78edb0bb More tests for --https-enfore
* src/options.c: Add debug lines, fix exit_status to exit_status_t
* src/wget_options.h: Amend prototype of get_exit_status()
* tests/test--https-enforce-soft2.c: New test
* tests/test--https-enforce-soft3.c: New test
* tests/Makefile.am: Add new tests
* src/wget.c (_fallback_to_http): Skip robotstxt jobs
* tests/libtest.c: New option WGET_TEST_HTTPS_REJECT_CONNECTIONS
  for wget_test_start_server()
2018-01-30 12:32:25 +01:00
af2a11e3ef Add tests for --https-enforce
* tests/Makefile.am: Add new tests
* tests/libtest.c: Code cleanup,
  (_answer_to_connection): implement protocol specific urls,
  (wget_test_start_server): implement WGET_TEST_HTTP(S)_ONLY,
  (wget_test): Allow absolute URLS for WGET_TEST_REQUEST_URL(S)
* tests/libtest.h (wget_test_url_t): Add https_only and http_only
2018-01-30 12:32:25 +01:00
39dfeec1ae Fixed problems pointed out in MR. Added tests and doxygen documentation.
* bootstrap.conf: Add canonicalize module.
* cfg.mk: Added exclusions to no new line at EOF for binary files used in tests.
* configure.ac: Check for libgpgme
* docs/wget2_manual.md: Added manual entries for --verify-sig, --gnupg-homedir, and new exit codes.
* fuzz/Makefile.am: Amend linker options
* include/wget/wget.h: Add error codes for GPG signature verification.
* po/POTFILES.in: Add new files.
* src/Makefile.am: Add src/gpgme.c and src/wget_gpgme.h
* src/gpgme.c: Using new error codes, and better signature verification failure detection.
* src/job.c (job_free): Free sig_filename
* src/options.c: Add new options --gnupg-homedir and --verify-sig
* src/wget.c: Verify the signature if possible, exit with the proper status code,
  print error messages
* src/wget_gpgme.h: Add documentation.
* src/wget_job.h: Extend struct JOB
* src/wget_options.h: Add new status codes, add new members to struct config
* tests/Makefile.am: Added new tests.
* tests/gpg-test-util.h: Common GPG testing functionality (tries to verify a signature, expects exit code ... etc).
* tests/gpg/helloworld.txt: Text that has been signed in the .sig files.
* tests/gpg/helloworld.txt.{invalid,no-pub,missing,trusted}.sig: Signatures on helloworld.txt with properties described by their names.
* tests/gpg/openpgp-revocs.d/*: Revocation certs for the fake "homedir"
* tests/gpg/private-keys-v1.d/*: The not-so-private private keys used to sign the test file.
* tests/gpg/pubring.kbx: Fake gnupg homedir public key ring.
* tests/gpg/test-gpg-*.c: Tests.
* tests/valgrind-supressions: Supress failures due to oddness with GPGME.
* unit-tests/Makefile.am: Add src/gpgme.o to BASE_OBJS
2018-01-01 13:28:43 +01:00
c3dfed402d Remove testing for MHD in test suite
* tests/libtest.c: Likewise
* tests/libtest.h: Likewise

Reported-by: Gisle Vanem
2017-10-04 13:00:33 +02:00
985b2a8747 Remove obsolete server code from library and test suite
* include/wget/wget.h: Remove wget_tcp_listen(), wget_tcp_accept(),
  wget_ssl_server_init(), wget_ssl_server_deinit(), wget_ssl_server_open(),
  wget_ssl_server_close().
* libwget/net.c: Remove wget_tcp_listen(), wget_tcp_accept(),
  remove tcp->passive,
  amend wget_tcp_tls_start() and wget_tcp_tls_stop().
* libwget/net.h: Remove tcp->passive.
* libwget/ssl_gnutls.c: Remove server variables, wget_ssl_server_init(),
  wget_ssl_server_deinit(), wget_ssl_server_open(), wget_ssl_server_close().
* tests/libtest.c: Remove FTP(S) code and obsolete test server code.
* tests/libtest.h: Remove FTP flags, structures, functions.
2017-09-20 14:34:56 +02:00
ce46c1af6a * tests/libtest.h: Add WGET_TEST_FEATURE_FTP to satisfy clang 2017-09-18 14:46:02 +02:00
615bef51e9 Use Feature Flags to SKIP unsupported tests
* tests/libtest.{c,h}: Add support for feature flags during test
startup. Check if Wget2 is compiled with the feature and conditionally
SKIP the tests
* tests/test-*.c: Pass the right feature flags for each test. MHD for
HTTP, FTP for FTP, IDN and PLUGIN when applicable
2017-09-18 11:28:40 +02:00
e0703c5c26 Add digest authentication test
* tests/Makefile.am: Add test 'test-auth-digest'
* tests/libtest.c: Fix HTTP server to handle digest
  authentication
* tests/libtest.h: Add opaque for digest authentication
* tests/test-auth-digest.c: Add new test to prove digest
  authentication functionality
2017-09-12 12:38:29 +02:00
c5f52449c6 Fix more tests for MinGW build
* include/wget/wget.h: Fixed indentation
* tests/libtest.h (wget_test_file_t): Add restricted_mode member
* tests/libtest.c (_scan_for_unexpected): Respect 'restricted_mode' value,
  (wget_test): Likewise.
* test-iri-percent.c: Set WGET_RESTRICT_NAMES_NOCONTROL to expected filename
* tests/test-iri.c: Likewise
* tests/test-iri-subdir.c: Skip test on Windows build
2017-05-23 22:01:01 +02:00
b3aede0e57 Remove gnulib dependencies from examples and wget.h
* cfg.mk: Add examples as excludes for config.h
* examples/Makefile.am: Remove -I to srcdir and builddir
* examples/*.c: Remove #include <config.h>
* include/wget/wget.h: Remove gettext include and defines
* libwget/private.h: Add gettext include and defines
* src/wget_main.h: Likewise
* tests/libtest.h: Likewise
* src/log.c: Add #include <string.h>
2017-04-30 21:37:39 +02:00
59f163cd7b Remove useless cpp parens (syntax-check) 2017-04-29 20:56:57 +02:00
c1dee14c72 Spell filesystem 'file system' (syntax-check)
* docs/wget2_manual.md: filesystem -> file system
* tests/libtest.c: Likewise
* tests/libtest.h: Likewise
* tests/test-wget-1.c: Likewise
2017-04-29 19:41:15 +02:00
dba2663197 Fix --chunk-size with missing Content-Length
* src/wget.c (process_head_response): Don't release job after HEAD
* tests/libtest.c: Implement WGET_TEST_SERVER_SEND_CONTENT_LENGTH
* tests/libtest.h: Define WGET_TEST_SERVER_SEND_CONTENT_LENGTH
* tests/test-wget-1.c: Add new tests for --chunk-size
2017-04-21 12:49:34 +02:00
ec396c577f Fix URLs to HTTPS where possible 2017-02-28 15:31:30 +01:00
909afd75fc Make the visibiity attribute preceed the prototype
* include/wget/wget.h: Make library symbol export attribute
((__visibility__)) preceed the function prototype to work on Windows
with MSVC
* tests/libtest.h: Same

Reported-by: Gisle Vanem
2016-11-16 12:03:27 +01:00
ecbfea77c0 Rename LIBWGET_EXPORT to WGETAPI
* include/wget/wget.t: Rename LIBWGET_EXPORT to WGETAPI
* tests/libtest.h: Same
2016-11-16 11:45:46 +01:00
9568b0c87e Rename include/libwget.h to include/wget/wget.h+wgetver.h 2016-09-30 09:47:32 +02:00
37687a2c5b Let test suite survive on case-sensitive filesystems (e.g. HFS+)
* tests/libtest.c: New function wget_test_check_filesystem(),
  (_empty_directory, _remove_directory): Do not print
  errors about missing directories.
* tests/libtest.h: Add define WGET_TEST_FS_CASEMATTERS
* tests/test--accept.c: Renamed files to avoid casing problems
* tests/test-wget-1.c: Skip casing tests on case-sensitive filesystem
2016-05-19 16:55:43 +02:00
dd3c2f63b2 Updated copyright year for all relevant files 2016-01-25 13:06:21 +01:00
7250e6ccb9 Add symbol visibility control to libwget
* autogen.sh: Add gnulib module lib-symbol-visibility,
  add --libtool to gnulib-tool invokation
* examples/Makefile.am: Remove -static from AM_LDFLAGS,
  remove ../lib/libgnu.a from LDADD
* include/libwget.h.in: Define LIBWGET_EXPORT,
  add LIBWGET_EXPORT to all visible symbols
* libwget/Makefile.am: Remove AM_CPPFLAGS and LDADD,
  add libwget_la_CPPFLAGS and libwget_la_LIBADD,
  add test_linking_CPPFLAGS, fix test_linking_LDADD
* libwget/iri.c: Add LIBWGET_EXPORT to wget_iri_schemes and iri_ports
* src/Makefile.am: Remove wget2_LDFLAGS, fix wget2_LDADD
* tests/Makefile.am: Fix LDADD, fix test_LDADD, fix test_parse_html_LDADD,
  fix libtest_la_CPPFLAGS and libtest_la_LIBADD
* tests/libtest.h: Add LIBWGET_EXPORT to symbols
2016-01-15 11:21:35 +01:00
3cb9027e51 Add extension of test suite port variables in response headers
* tests/libtest.h: Add member header_alloc to wget_test_url_t
* tests/libtest.c: Extend port vars in response headers
2015-10-20 22:41:36 +02:00
0f8e49128a Transfer copyright to Free Software Foundation, Inc. 2015-09-22 11:50:06 +02:00
c6b0e461a1 Transform Mget into Wget 2015-09-19 22:54:38 +02:00
9de3f85c77 Add AUTH command to FTP test suite 2015-07-12 21:01:56 +02:00
a7d9d4fcf3 Add FTPS server to test suite 2015-07-11 10:01:36 +02:00
c0a5561afc Allow ordered and unordered I/O for FTP test suite 2015-07-11 09:35:26 +02:00