Commit Graph

251 Commits

Author SHA1 Message Date
Tim Rühsen
3d1d5b317b * tests/Makefile.am: Let WGETRC work on *nix and Windows 2016-10-07 13:27:07 +02:00
Tim Rühsen
b30500f0f4 Fix Test-iri-forced-remote
* tests/Test-iri-forced-remote.px: Fix encodings
2015-12-20 21:32:06 +01:00
Eli Zaretskii
59b920874d Support non-ASCII URLs
* src/url.c [HAVE_ICONV]: Include iconv.h and langinfo.h.
(convert_fname): New function.
[HAVE_ICONV]: Convert file name from remote encoding to local
encoding.
(url_file_name): Call convert_fname.
(filechr_table): Don't consider bytes in 128..159 as control
characters.

* tests/Test-ftp-iri.px: Fix the expected file name to match the
new file-name recoding.  State the remote encoding explicitly on
the Wget command line.

* NEWS: Mention the URI recoding when built with libiconv.
2015-12-18 20:54:39 +01:00
Tim Rühsen
358a3c330f Let Test-k survive on CygWin and Windows
* tests/Test-k.px: Use --restrict-file-names for CygWin/Windows
  filename requirements.
2015-12-14 09:36:40 +01:00
Darshit Shah
b0d2fa5748 Introduce Travis Integration
* .travis.yml: Configuration file for Travis-CI
* contrib/travis-ci: Script to run on travis. Similar to check-hard but modified
  for travis.
* tests/valgrind-suppressions{-ssl}: Add extra suppressions to prevent a
Valgrind False Positive errors in an old version

Since Travis currently supports only public repositories on GitHub, the support
for automated testing through Travis will be done using my Clone of Wget on
GitHub at: https://github.com/darnir/wget.git
Any commits pushed to this repository will trigger a build on Travis.
2015-12-06 21:50:58 +01:00
Tim Rühsen
b14eeb5aee Fix URL conversion for colons in filenames
* src/convert.c (construct_relative): Prepend './' to filename
* tests/Test-k.px: Amend test to succeed
2015-10-27 13:13:54 +01:00
Darshit Shah
3608c3001c Fix Test-ftp-pasv-not-supported.px
* tests/Test-ftp-pasv-not-supported.px: We do *NOT* expect any
    downloaded files. Also, do not negate the Test response.

    The test originally expected a downloaded file, but this is not
    true. As a result, the test would fail and return exit code 1. This
    was presumably the reason why the test result was negated before
    returning to the shell. Fix this issue, so that the test runs
    correctly without any hacks.
2015-10-12 22:05:49 +05:30
Darshit Shah
d484b14174 Fix make distcheck failures in Perl SSL Tests
* tests/Makefile.am: Add valgrind-suppressions-ssl to EXTRA_DIST
    * tests/Test-proxied-https-auth-keepalive.px: Find valgrind in
    correct path during make distcheck
    * tests/Test-proxied-https-auth.px: Same
2015-10-12 22:05:44 +05:30
christian fafard
b8ee370571 Skip HTTPS perl tests if IO::Socket::SSL not installed
* tests/Test-proxied-https-auth-keepalive.px: Skip test if perl module
  IO::Socket::SSL is not installed (trivial change).
* tests/Test-proxied-https-auth.px: Skip test if perl module
  IO::Socket::SSL is not installed (trivial change).
2015-10-12 10:03:30 +02:00
Tim Rühsen
075d755696 Fix IP address exposure in FTP code
* src/ftp.c (getftp): Do not use PORT when PASV fails.
* tests/FTPServer.px: Add pasv_not_supported server flag.
* tests/Makefile.am: Add Test-ftp-pasv-not-supported.px
* tests/Test-ftp-pasv-not-supported.px: New test

Fix IP address exposure when automatically falling back from
passive mode to active mode (using the PORT command). A behavior that
may be used to expose a client's privacy even when using a proxy.
2015-08-11 17:38:33 +02:00
Jookia
98272d2c8d Rewrite the --rejected-log test using the new framework.
* tests/Test--rejected-log.px: Remove old test.
 * testenv/Test--rejected-log.py: Create new test.
2015-08-07 08:20:47 +02:00
Jookia
e4db00d74d Add option to write URL rejections to a tab-delimited CSV log.
* main.c: Add "--rejected-log" option.
 * init.c: Add "rejectedlog" command.
 * options.h: Add "rejected_log" parameter string.
 * wget.texi: Add brief documentation on new --rejected-log option.
 * recur.c: Optionally log details of URLs not traversed.
   Add reject_reason enum.
   (download_child_p -> download_child): Return a reject_reason.
   (descend_redirect_p -> descend_redirect): Return a reject_reason.
   (retrieve_tree): Support logging reasons for rejection.
   Add write_reject_log_header that writes a CSV format header to a file.
   Add write_reject_log_url that writes a url struct to a file in CSV format.
   Add write_reject_log_reason that writes the URL and parent URL as well as the
   rejection reason to a CSV file.
 * Test--rejected-log.px: Add a basic test for the --rejected-log command.
 * tests/Makefile.am: Run Test--rejected-log.px.

This allows you to figure out why URLs are being rejected and some context
around it. CSV is used as the output format since it can be used easily parsed,
it's delimited by tabs instead of commas to allow using all (quoted) URL
characters and includes column names which may be used for compatibility.
2015-08-06 08:10:55 +02:00
Darshit Shah
58702ffd4f Add valgrind suppression files for HTTPS tests
* testenv/test/base_test.py: Use Valgrind SSL suppressions file for
    tests
    * testenv/valgrind-suppression-ssl, tests/valgrind-suppression-ssl:
    Add new suppression files to suppress OpenSSL errors in valgrind
    * tests/test-proxied-https-auth.px: Use the valgrind SSL
    suppressions file for the test
    * tests/test-proxied-https-auth-keepalive.px: Same
2015-06-16 20:31:00 +05:30
Pär Karlsson
83537f2415 Fix undeclared loop variable in Perl test suite
Reported-by: Hubert Tarasiuk <hubert.tarasiuk@gmail.com>
2015-05-20 10:04:07 +02:00
Tim Rühsen
bebe462a67 Silence warning in perl test suite
* tests/WgetTests.pm: Use string comparisons for $valgrind variable
2015-04-17 22:42:59 +02:00
Tim Ruehsen
5c5d45ae49 Added GDB support to Perl tests
* WgetTests.pm (run): Check GDB_TESTS environment variable.
2015-04-13 19:29:43 +02:00
Hubert Tarasiuk
f4072e5d0b Add Valgrind suppression for libidn.so at idna_to_ascii_4z
* tests/WgetTests.pm (run): Include suppression file when running Valgrind.
* tests/valgrind-suppressions: Add suppression for idn_to_ascii_4z.
* tests/Makefile.am: Add valgrind-suppressions to EXTRA_DIST.
2015-04-11 23:16:32 +02:00
Giuseppe Scrivano
16f1fb1d1f maint: update copyright year ranges to include 2015 2015-03-09 16:32:01 +01:00
Dagobert Michelsen
4e8e159289 tests/Makefile.am: Solaris needs libintl and libiconv for testsuite 2015-01-22 16:13:26 +01:00
Giuseppe Scrivano
a8d437d827 merge ChangeLog files in ChangeLog-2014-12-10.
* ChangeLog: truncate file.
* ChangeLog.README: Likewise.
* doc/ChangeLog: Likewise.
* msdos/ChangeLog: Likewise.
* src/ChangeLog: Likewise.
* testenv/ChangeLog: Likewise.
* tests/ChangeLog: Likewise.
* ChangeLog-2014-12-10: New file.
* Makefile.am: Distribute ChangeLog-2014-12-10.
2014-12-24 11:04:30 +01:00
Tim Ruehsen
9ee2fdd50d tests/FTPServer.pm: Fix ftp tests for Windows
The Single Unix strftime format specifier %e is not supported by
MS Windows. Instead we now use %d.

Reported-By: Eli Zaretskii <eliz@gnu.org>
2014-12-21 18:12:17 +01:00
Eli Zaretskii
365aeba704 tests/WgetTests.pm: Print timestamps when tests fail due to wrong timestamps 2014-12-20 12:07:42 +01:00
Darshit Shah
425368c602 Revert "ChangeLog: Move all ChangeLog files to .pre-gitlog"
This reverts commit fcd3b3c473.

Turns out that removing the ChangeLog files causes the Wget build to
fail. While this issue is investigated and sorted out, the commit is
reversed to allow people to be able to build Wget from master
2014-12-16 23:31:36 +05:30
Darshit Shah
fcd3b3c473 ChangeLog: Move all ChangeLog files to .pre-gitlog
From v1.16.1 onwards, Wget no longer maintains an active ChangeLog file.
Instead the ChangeLog will be automatically generated on each release
through gnulib's gitlog-to-changelog script. However, the old versions
of the ChangeLog files are retained for reference. These files are
renamed with a .pre-gitlog appended to their filenames.
Also removed ChangeLog.README file which is not required anymore
2014-12-16 00:51:56 +05:30
Tim Rühsen
f0e7326c20 Perl test suite: Substitue server port in HTTP headers 2014-11-26 12:25:40 +01:00
Tim Rühsen
b6d8e1e707 Added $(LIB_CLOCK_GETTIME) to unit test linkage
On systems with separate librt we need this to successfully
link the unit test program.

Reported-by: kdevel@vogtner.de
2014-11-05 16:42:21 +01:00
Tim Rühsen
43e5f022e2 Fix skip exit code to 77 in tests/Test-stdouterr.px 2014-11-05 12:10:57 +01:00
Pär Karlsson
5e71d5aea1 * WgetFeature.pm: Fixed finding of WgetFeature.cfg when using separate
build dirs.
 * WgetFeature.pm: Fixed warning from BLOCK eval, made it indo EXPR eval

This fixes 'make distcheck' and removes a warning.
2014-11-03 14:23:29 +01:00
Tim Rühsen
c6300a3ac7 * added new test Test-proxied-https-auth-keepalive.px
This test similar to Test-proxied-https-auth except that his test
 simulates a persistent connection to the destination server.
2014-11-03 11:37:02 +01:00
Tim Rühsen
2303793a62 * Test-proxied-https-auth.px:
add valgrind support,
   sync parent / child (client / server)

Fixed the missing synchronization between server and client.
Without this, we experienced random test failures.
Also added valgrind support.
2014-11-03 11:33:53 +01:00
Pär Karlsson
8078adee7f Stylistic and idiomatic cleanups in Perl tests 2014-11-01 22:37:57 +05:30
Tim Rühsen
64a3d521de fix skip exit code 77 2014-10-30 15:41:07 +01:00
Tim Rühsen
9c34d4ed09 add ./configure valgrind support to test suites 2014-10-28 12:32:12 +01:00
Tim Rühsen
3eff3ad69a synchronize client and server in Test-proxied-https-auth.px 2014-10-28 11:40:34 +01:00
Giuseppe Scrivano
e5cb0f77e6 Revert "Replace @VAR@ in Makefile.am files with $VAR"
This reverts commit d1ab00cab4.

Conflicts:
	tests/Makefile.am
2014-10-28 10:42:50 +01:00
Tim Rühsen
bc347cc36f fixed IRI misbehaviour(s) 2014-10-20 08:53:12 +02:00
Tim Rühsen
ff876a3710 use test filename as default test name 2014-10-02 15:01:19 +02:00
Tim Rühsen
21fc7546ef remove run-px from tests/makefile.am 2014-10-02 10:08:31 +02:00
Tim Rühsen
afbcaaecba fixed test suite race conditions due to double usage of names 2014-10-01 21:40:19 +02:00
Tim Rühsen
b64fa2eb84 Switched to parallel test harness 2014-10-01 14:41:32 +05:30
Giuseppe Scrivano
d1ab00cab4 Replace @VAR@ in Makefile.am files with $VAR 2014-06-12 18:49:15 +02:00
Giuseppe Scrivano
dd1b69c600 Remove trailing empty lines 2014-06-12 18:49:15 +02:00
Giuseppe Scrivano
087e17be1c Do not use exit() with a magic number 2014-06-12 18:48:48 +02:00
Tim Ruehsen
848d7537e1 fixed 204 response handling, added new Test-204.px 2014-04-24 13:27:44 +02:00
Giuseppe Scrivano
6c572cbc33 tests: add missing files to Makefile.am 2014-04-22 19:55:31 +02:00
Yousong Zhou
d7ea21b2e7 Tests: Add constraint on https for --https-only test.
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2014-03-21 11:21:10 +01:00
Yousong Zhou
c9bc854938 Tests: Add test cases for option --start-pos.
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2014-03-21 11:21:10 +01:00
Yousong Zhou
ed54c64ad2 Tests: exclude existing files from the check of unexpected downloads.
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2014-03-21 11:21:10 +01:00
Yousong Zhou
701e407af5 Tests: fix TYPE and RETR command handling.
- FTPServer.pm's handling of TYPE command would ignore binary mode
   transfer request.
 - The FTP server would run into dead loop sending the same content
   forever.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2014-03-21 11:21:10 +01:00
Lars Wendler
593b59c697 Don't use --debug in Test--post-file.px
Test--post-file.px fails when wget is compiled without debugging support.

Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
2014-01-27 23:33:08 +01:00
Darshit Shah
12218d353b Add tests to EXTRA_DIST variable for distribution packaging 2013-11-04 10:59:10 +01:00
Andrea Urbani
c3835a425a "LIST" or "LIST -a" ftp command according to the remote system 2013-10-28 23:37:10 +01:00
Giuseppe Scrivano
fbd9b9c16b tests: do not use -H on IDN tests 2013-10-10 23:19:48 +02:00
Tim Ruehsen
c289349684 improved Test-idn-robots.px 2013-10-07 23:58:53 +02:00
Tim Ruehsen
42c78fdd71 added option --https-only 2013-08-22 20:05:41 +02:00
Darshit Shah
e3b3ea5120 Add test to ensure correct return code on --post-file failure
Signed-off-by: Darshit Shah <darnir@gmail.com>
2013-03-14 21:38:40 +01:00
Tim Ruehsen
98f843f3cc added check for must-not-match request-header
* HTTPServer.pm: added check for must-not-match request-header
* Test-cookies.px: check cookie deletion and cookie domain matching
2012-11-12 23:35:34 +01:00
Giuseppe Scrivano
6aa2a7cc98 Add new test 2012-06-16 13:05:03 +02:00
Giuseppe Scrivano
8bdce1809d Add missing files. 2011-07-26 16:00:16 +02:00
Merinov Nikolay
37c85ecba3 Fix problem with IDN and UTF-8 encoding. 2011-07-26 09:27:08 +02:00
Giuseppe Scrivano
87a176daa7 Use futimens instead of utimes. 2011-04-19 12:33:46 +02:00
Giuseppe Scrivano
1cba1a7659 Fix openssl detection under Windows. 2011-04-04 00:13:53 +02:00
Giuseppe Scrivano
2f6aa1d741 mass change: update copyright years. 2011-01-01 13:19:37 +01:00
Giuseppe Scrivano
8405493e1d gnutls: fix build under mingw32. 2010-10-23 13:50:31 +02:00
Mike Frysinger
63473a2663 tests: Fix some failures because of missing --trust-server-names 2010-09-12 15:21:50 +02:00
Giuseppe Scrivano
4f16c7754c Use /usr/bin/env to find the perl interpreter. 2010-06-04 11:12:19 +02:00
Giuseppe Scrivano
05fccaeed2 Add new test. 2010-05-29 23:10:59 +02:00
Giuseppe Scrivano
58a9721edf Use the gnulib md5 module. 2010-05-16 01:34:17 +02:00
Giuseppe Scrivano
293008f682 Mass update copyright years. 2010-05-08 21:56:15 +02:00
Giuseppe Scrivano
5a97871f5d Fix unit tests build in a VPATH. 2010-05-07 13:10:09 +02:00
Steven Schubiger
ec6950f1a6 Make -i work with FTP. 2010-03-02 00:00:17 +01:00
Steven Schubiger
f6a33f1dd0 Test -i with HTTP. 2010-02-26 23:07:51 +01:00
Steven Schubiger
baf9994402 Add port substitution for FTP to tests. 2010-02-25 21:47:53 +01:00
Steven Schubiger
2f0223872c Also remove -d (--debug) from .px tests. 2009-10-14 11:26:55 +02:00
Micah Cowan
0d79e4aadc Remove --debug from .px tests. 2009-09-27 11:29:01 -07:00
Micah Cowan
5511220638 Fixed some test names. 2009-09-24 10:25:14 -07:00
Micah Cowan
4a08094db8 [mq]: cfg-mk 2009-09-21 20:39:44 -07:00
Micah Cowan
46d60a374a run-px: exit with failure if unknown exit codes. 2009-09-07 23:11:48 -07:00
Micah Cowan
f3203b8626 Test for Content-Disposition in HTTP auth. 2009-09-07 23:09:15 -07:00
Micah Cowan
aab7dadc9a Attempted, but failed, to reproduce bug 22403. 2009-09-07 22:40:25 -07:00
Micah Cowan
544afabb39 Automated merge. 2009-09-06 14:08:56 -07:00
Micah Cowan
1274565a64 Regression test for getftp bug (fails). 2009-09-06 13:04:22 -07:00
Micah Cowan
ad4b678d2d Rewrote FTPServer.pm to avoid filesystem; added Test-ftp-recursive.px. 2009-09-05 23:08:55 -07:00
Steven Schubiger
986cfac8d5 Enhance tests to include feature checking. 2009-09-05 22:54:05 +02:00
Micah Cowan
1fe5ddb7fe Error-checking improvements to WgetTest.pm. 2009-09-04 18:32:52 -07:00
Micah Cowan
fcdf608fb2 Remove harmful dependency line for unit-tests. 2009-09-02 11:27:13 -07:00
Micah Cowan
42d953765b Automated merge. 2009-09-01 11:00:57 -07:00
Micah Cowan
306e622a61 Make run-unit-tests _always_ make libunittest.a. 2009-09-01 10:58:32 -07:00
Steven Schubiger
7543c0831d Add more testfiles to dist. 2009-09-01 11:07:41 +02:00
Steven Schubiger
e57b3b231a Add testfile to dist. 2009-08-31 22:59:05 +02:00
Steven Schubiger
b4dca1816f Escape semicolons when converting links (#27272). 2009-08-29 23:24:49 +02:00
Micah Cowan
b014f8fae9 Improved exit status handling. 2009-08-27 23:08:58 -07:00
Micah Cowan
d21dde51b8 Heed cookies from 401s. 2009-08-27 00:40:48 -07:00
Micah Cowan
fb0946c7fc --restrict-file-names=ascii 2009-07-27 23:41:26 -07:00
Micah Cowan
da2ac85f40 Documentation fixes for IRI options, and rename --locale -> --local-encoding. 2009-07-26 21:50:19 -07:00
Steven Schubiger
76bd534668 Make IDN/IRI tests part of distribution. 2009-07-07 20:28:56 +02:00
Micah Cowan
5febddec70 Fix meta name=robots. 2009-07-05 23:23:17 -07:00
Micah Cowan
fcdfd63e8f Prefer --no-iri over --iri=no. 2009-07-03 19:31:28 -07:00
Micah Cowan
a00b834bb3 Referer/IRI fix. 2009-07-01 23:17:33 -07:00
Micah Cowan
901343828b FTP recursion test, when IRI is on. 2009-06-29 18:53:13 -07:00