From dfd399c370be72ecbfb8fe47915ef9b7bf96a634 Mon Sep 17 00:00:00 2001 From: Ahmed El-Mahmoudy Date: Sun, 25 Jul 2010 20:32:37 +0200 Subject: [PATCH] Fixes to make test target to work --- src/mime/backend/Makefile | 2 +- src/protocol/test/stub.c | 9 +++++++++ src/protocol/test/uri-test.c | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/mime/backend/Makefile b/src/mime/backend/Makefile index b511d99c0..9c0f1e003 100644 --- a/src/mime/backend/Makefile +++ b/src/mime/backend/Makefile @@ -11,7 +11,7 @@ TEST_PROGS = \ # The dependencies are a bit funny here! I don't know why. Just remember to # make clean before making the test. --jonas -mailcap-cache.o: mailcap.c +mailcap-cache.o: $(top_srcdir)/src/mime/backend/mailcap.c $(call cmd,compile,-DTEST_MAILCAP) TESTDEPS = \ diff --git a/src/protocol/test/stub.c b/src/protocol/test/stub.c index dcf7125dc..9b8ff5b34 100644 --- a/src/protocol/test/stub.c +++ b/src/protocol/test/stub.c @@ -11,6 +11,7 @@ #include "bfu/msgbox.h" #include "main/module.h" +#include "protocol/file/mailcap.h" #include "protocol/user.h" #include "session/session.h" #include "util/test.h" @@ -61,6 +62,7 @@ stub_called(const unsigned char *fun) protocol_external_handler_T name /* consume semicolon */ STUB_PROTOCOL_HANDLER(about_protocol_handler); STUB_PROTOCOL_HANDLER(bittorrent_protocol_handler); +STUB_PROTOCOL_HANDLER(bittorrent_peer_protocol_handler); STUB_PROTOCOL_HANDLER(data_protocol_handler); STUB_PROTOCOL_EXTERNAL_HANDLER(ecmascript_protocol_handler); STUB_PROTOCOL_HANDLER(file_protocol_handler); @@ -111,3 +113,10 @@ msg_box(struct terminal *term, struct memory_list *mem_list, return NULL; } +/* declared in "protocol/file/mailcap.h" */ +void +execute_mailcap(struct connection *conn) +{ + stub_called("execute_mailcap"); + return NULL; +} diff --git a/src/protocol/test/uri-test.c b/src/protocol/test/uri-test.c index 8681bfd2e..d694151c4 100644 --- a/src/protocol/test/uri-test.c +++ b/src/protocol/test/uri-test.c @@ -2,6 +2,7 @@ #include "config.h" #endif +#include #include #include "elinks.h"