mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Skip running rc files while executing tests.
This commit is contained in:
parent
42253233c3
commit
236ab6d8e0
@ -1,3 +1,8 @@
|
||||
2009-04-11 Steven Schubiger <stsc@member.fsf.org>
|
||||
|
||||
* init.c (initialize): Run a custom SYSTEM_WGETRC when
|
||||
provided as an environment variable.
|
||||
|
||||
2009-02-27 Gisle Vanem <gvanem@broadpark.no>
|
||||
|
||||
* main.c (main): "freopen (NULL,.." causes an assertion in MSVC
|
||||
|
13
src/init.c
13
src/init.c
@ -1,6 +1,6 @@
|
||||
/* Reading/parsing the initialization file.
|
||||
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
|
||||
2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Wget.
|
||||
|
||||
@ -542,15 +542,20 @@ run_wgetrc (const char *file)
|
||||
void
|
||||
initialize (void)
|
||||
{
|
||||
char *file;
|
||||
char *file, *env_sysrc;
|
||||
int ok = true;
|
||||
|
||||
/* Load the hard-coded defaults. */
|
||||
defaults ();
|
||||
|
||||
/* If SYSTEM_WGETRC is defined, use it. */
|
||||
/* Run a non-standard system rc file when the according environment
|
||||
variable has been set. For internal testing purposes only! */
|
||||
env_sysrc = getenv ("SYSTEM_WGETRC");
|
||||
if (env_sysrc && file_exists_p (env_sysrc))
|
||||
ok &= run_wgetrc (env_sysrc);
|
||||
/* Otherwise, if SYSTEM_WGETRC is defined, use it. */
|
||||
#ifdef SYSTEM_WGETRC
|
||||
if (file_exists_p (SYSTEM_WGETRC))
|
||||
else if (file_exists_p (SYSTEM_WGETRC))
|
||||
ok &= run_wgetrc (SYSTEM_WGETRC);
|
||||
#endif
|
||||
/* Override it with your own, if one exists. */
|
||||
|
@ -1,3 +1,8 @@
|
||||
2009-04-11 Steven Schubiger <stsc@member.fsf.org>
|
||||
|
||||
* run-px: Skip testing with real rc files by setting
|
||||
SYSTEM_WGETRC and WGETRC to /dev/null.
|
||||
|
||||
2009-02-25 Benjamin Wolsey <bwy@benjaminwolsey.de>
|
||||
|
||||
* Makefile.am (run-px-tests): Ensure run-px is run from srcdir.
|
||||
|
@ -55,6 +55,10 @@ my @tests = (
|
||||
'Test--spider-r.px',
|
||||
);
|
||||
|
||||
foreach my $var (qw(SYSTEM_WGETRC WGETRC)) {
|
||||
$ENV{$var} = '/dev/null';
|
||||
}
|
||||
|
||||
my @tested;
|
||||
|
||||
foreach my $test (@tests) {
|
||||
@ -63,6 +67,10 @@ foreach my $test (@tests) {
|
||||
push @tested, { name => $test, result => $? };
|
||||
}
|
||||
|
||||
foreach my $var (qw(SYSTEM_WGETRC WGETRC)) {
|
||||
delete $ENV{$var};
|
||||
}
|
||||
|
||||
print "\n";
|
||||
foreach my $test (@tested) {
|
||||
($test->{result} == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user