mirror of
https://github.com/mirror/wget.git
synced 2024-12-28 05:40:08 +08:00
Move unit-test code to tests/
* src/Makefile.am: Remove test.c and test.h * src/test.c: Rename to tests/unit-tests.c * src/test.h: Rename to tests/unit-tests.h * tests/Makefile.am: Add unit-tests.c and unit-tests.h * src/hsts.c: Amend #include * src/http.c: Likewise * src/init.c: Likewise * src/metalink.c: Likewise * src/res.c: Likewise * src/url.c: Likewise * src/utils.c: Likewise
This commit is contained in:
parent
3e84963e84
commit
de54c970b2
@ -101,7 +101,7 @@ distclean-local:
|
||||
rm -f css.c css_.c
|
||||
|
||||
check_LIBRARIES = libunittest.a
|
||||
libunittest_a_SOURCES = $(wget_SOURCES) test.c build_info.c test.h
|
||||
libunittest_a_SOURCES = $(wget_SOURCES) build_info.c
|
||||
nodist_libunittest_a_SOURCES = version.c
|
||||
libunittest_a_CPPFLAGS = -DTESTING "-I$(top_builddir)/lib" "-I$(top_srcdir)/lib"
|
||||
libunittest_a_LIBADD = $(LIBOBJS)
|
||||
|
@ -36,7 +36,7 @@ as that of the covered work. */
|
||||
#include "hash.h"
|
||||
#include "c-ctype.h"
|
||||
#ifdef TESTING
|
||||
#include "test.h"
|
||||
#include "../tests/unit-tests.h"
|
||||
#endif
|
||||
|
||||
#include <unistd.h>
|
||||
|
@ -71,7 +71,7 @@ as that of the covered work. */
|
||||
#endif
|
||||
|
||||
#ifdef TESTING
|
||||
#include "test.h"
|
||||
#include "../tests/unit-tests.h"
|
||||
#endif
|
||||
|
||||
#ifdef __VMS
|
||||
|
@ -72,7 +72,7 @@ as that of the covered work. */
|
||||
#include "c-strcase.h"
|
||||
|
||||
#ifdef TESTING
|
||||
#include "test.h"
|
||||
#include "../tests/unit-tests.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -53,7 +53,7 @@ as that of the covered work. */
|
||||
#endif
|
||||
|
||||
#ifdef TESTING
|
||||
#include "test.h"
|
||||
#include "../tests/unit-tests.h"
|
||||
#endif
|
||||
|
||||
/* Loop through all files in metalink structure and retrieve them.
|
||||
|
@ -84,7 +84,7 @@ as that of the covered work. */
|
||||
#include "c-strcase.h"
|
||||
|
||||
#ifdef TESTING
|
||||
#include "test.h"
|
||||
#include "../tests/unit-tests.h"
|
||||
#endif
|
||||
|
||||
struct path_info {
|
||||
|
@ -51,7 +51,7 @@ as that of the covered work. */
|
||||
#endif /* def __VMS */
|
||||
|
||||
#ifdef TESTING
|
||||
#include "test.h"
|
||||
#include "../tests/unit-tests.h"
|
||||
#endif
|
||||
|
||||
enum {
|
||||
|
@ -103,7 +103,7 @@ as that of the covered work. */
|
||||
#endif /* def __VMS */
|
||||
|
||||
#ifdef TESTING
|
||||
#include "test.h"
|
||||
#include "../tests/unit-tests.h"
|
||||
#endif
|
||||
|
||||
#include "exits.h"
|
||||
|
@ -142,11 +142,12 @@ EXTRA_DIST = FTPServer.pm FTPTest.pm HTTPServer.pm HTTPTest.pm \
|
||||
certs valgrind-suppressions valgrind-suppressions-ssl
|
||||
|
||||
check_PROGRAMS = unit-tests
|
||||
unit_tests_SOURCES =
|
||||
unit_tests_SOURCES = unit-tests.c unit-tests.h
|
||||
LDADD = ../src/libunittest.a ../lib/libgnu.a $(GETADDRINFO_LIB) $(HOSTENT_LIB)\
|
||||
$(INET_NTOP_LIB) $(LIBSOCKET) $(LIB_CLOCK_GETTIME) $(LIB_CRYPTO)\
|
||||
$(LIB_NANOSLEEP) $(LIB_POSIX_SPAWN) $(LIB_SELECT) $(LIBICONV) $(LIBINTL)\
|
||||
$(LIBTHREAD) $(LIBUNISTRING) $(SERVENT_LIB)
|
||||
AM_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib -DLOCALEDIR=\"$(localedir)\"
|
||||
|
||||
|
||||
CLEANFILES = *~ *.bak core core.[0-9]*
|
||||
|
@ -34,11 +34,7 @@ as that of the covered work. */
|
||||
# include <locale.h>
|
||||
#endif
|
||||
|
||||
#include "test.h"
|
||||
|
||||
#ifndef TESTING
|
||||
#error "TESTING not set!!!"
|
||||
#endif
|
||||
#include "unit-tests.h"
|
||||
|
||||
const char *program_argstring = "TEST";
|
||||
|
Loading…
Reference in New Issue
Block a user