1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[test] Fix building tests

mailcap test was too hard to build, so skip for now.
This commit is contained in:
Witold Filipczyk 2022-06-03 15:09:12 +02:00
parent cdbcd8a762
commit 09e3f044da
6 changed files with 32 additions and 4 deletions

View File

@ -9,6 +9,8 @@ TEST_PROGS = \
TESTDEPS = path.o
TESTDEPS-$(CONFIG_UTF8) += $(top_builddir)/src/intl/width.o
PARSETSTDEPS = \
$(top_builddir)/src/util/error.o \

View File

@ -6,4 +6,7 @@ TEST_PROGS = parse-meta-refresh-test
TESTDEPS += \
$(top_builddir)/src/document/html/parse-meta-refresh.o
TESTDEPS-$(CONFIG_UTF8) += $(top_builddir)/src/intl/width.o
include $(top_srcdir)/Makefile.lib

View File

@ -7,8 +7,8 @@ OBJS-$(CONFIG_MIMETYPES) += mimetypes.o
OBJS = common.o default.o
TEST_PROGS = \
mailcap-cache$(EXEEXT)
#TEST_PROGS = \
# mailcap-cache$(EXEEXT)
# The dependencies are a bit funny here! I don't know why. Just remember to
# make clean before making the test. --jonas

View File

@ -10,4 +10,6 @@ TESTDEPS = \
$(top_builddir)/src/protocol/date.o \
$(top_builddir)/src/protocol/ftp/parse.o
TESTDEPS-$(CONFIG_UTF8) += $(top_builddir)/src/intl/width.o
include $(top_srcdir)/Makefile.lib

View File

@ -9,6 +9,9 @@ TESTDEPS = \
$(top_builddir)/src/protocol/uri.o \
stub.o
TESTDEPS-$(CONFIG_NLS) += $(top_builddir)/src/intl/gettext/lib.o
TESTDEPS-$(CONFIG_UTF8) += $(top_builddir)/src/intl/width.o
CLEAN = stub.o
uri-test:: stub.o

View File

@ -16,6 +16,24 @@
#include "session/session.h"
#include "util/test.h"
enum retval {
RET_OK, /* All is well */
RET_ERROR, /* Failed to fetch URL or write document when dumping */
RET_SIGNAL, /* Catched SIGTERM which forced program to stop */
RET_SYNTAX, /* Cmdline syntax error or bad or missing dump URL */
RET_FATAL, /* Fatal error occurred during initialization */
RET_PING, /* --remote "ping()" found no running ELinkses */
RET_REMOTE, /* --remote failed to connect to a running ELinks */
RET_COMMAND, /* Used internally for exiting from cmdline commands */
};
struct program {
int terminate;
enum retval retval;
char *path;
} program;
#define STUB_MODULE(name) \
struct module name = struct_module( \
/* name: */ "Stub " #name, \
@ -79,7 +97,7 @@ STUB_PROTOCOL_EXTERNAL_HANDLER(user_protocol_handler);
/* declared in "protocol/user.h" */
char *
get_user_program(struct terminal *term, char *progid, int progidlen)
get_user_program(struct terminal *term, const char *progid, int progidlen)
{
stub_called("get_user_program");
return NULL;
@ -95,7 +113,7 @@ print_error_dialog(struct session *ses, struct connection_state state,
/* declared in "bfu/msgbox.h" */
char *
msg_text(struct terminal *term, char *format, ...)
msg_text(struct terminal *term, const char *format, ...)
{
stub_called("msg_text");
return NULL;