Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/ccfc2aeefa87400d506a5...
...commit
http://git.netsurf-browser.org/netsurf.git/commit/ccfc2aeefa87400d506a597...
...tree
http://git.netsurf-browser.org/netsurf.git/tree/ccfc2aeefa87400d506a59799...
The branch, master has been updated
via ccfc2aeefa87400d506a59799933ad591e7d92ca (commit)
from c38670ade8c664fa511cebb4b5d2950b12e7bf81 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=ccfc2aeefa87400d506...
commit ccfc2aeefa87400d506a59799933ad591e7d92ca
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
make nsurl unit test work again
diff --git a/Makefile b/Makefile
index 107e61c..fc3225a 100644
--- a/Makefile
+++ b/Makefile
@@ -824,3 +824,8 @@ install: all-program install-$(TARGET)
docs:
doxygen Docs/Doxyfile
+
+.PHONY:test
+
+test:
+ make -C test
\ No newline at end of file
diff --git a/test/Makefile b/test/Makefile
index cf0f897..7327580 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,4 +1,7 @@
-CFLAGS := -std=c99 -g -O0 -D_BSD_SOURCE -D_POSIX_C_SOURCE -I.. \
+#
+# NetSurf unit tests
+
+CFLAGS := -std=c99 -g -O0 -D_BSD_SOURCE -D_POSIX_C_SOURCE -I. -I.. \
$(shell pkg-config --cflags libcurl)
LDFLAGS := $(shell pkg-config --libs libcurl) -lz
@@ -8,30 +11,31 @@ llcache_LDFLAGS := $(shell pkg-config --libs libparserutils
libwapcaplet libdom)
llcache_SRCS := content/fetch.c content/fetchers/curl.c \
content/fetchers/about.c content/fetchers/data.c \
content/fetchers/resource.c content/llcache.c \
- content/urldb.c desktop/options.c desktop/version.c \
+ content/urldb.c desktop/version.c \
image/image_cache.c \
utils/base64.c utils/corestrings.c utils/hashtable.c \
utils/log.c utils/nsurl.c utils/messages.c utils/url.c \
utils/useragent.c utils/utils.c test/llcache.c
urldbtest_SRCS := content/urldb.c utils/url.c utils/utils.c utils/log.c \
- desktop/options.c utils/messages.c utils/hashtable.c \
+ utils/messages.c utils/hashtable.c \
utils/filename.c utils/nsurl.c utils/corestrings.c \
test/urldbtest.c
-urldbtest_CFLAGS := $(shell pkg-config --cflags libwapcaplet libdom) -O2
-urldbtest_LDFLAGS := $(shell pkg-config --libs libwapcaplet libdom)
+urldbtest_CFLAGS := $(shell pkg-config --cflags libwapcaplet libdom libnsutils) -O2
+urldbtest_LDFLAGS := $(shell pkg-config --libs libwapcaplet libdom libnsutils)
-nsurl_SRCS := utils/corestrings.c utils/log.c utils/nsurl.c utils/idna.c utils/utf8proc.c
test/nsurl.c
-nsurl_CFLAGS := $(shell pkg-config --cflags libwapcaplet libdom)
-nsurl_LDFLAGS := $(shell pkg-config --libs libwapcaplet libdom)
+nsurl_SRCS := utils/corestrings.c utils/log.c utils/nsurl.c utils/idna.c
desktop/version.c test/nsurl.c
+nsurl_CFLAGS := $(shell pkg-config --cflags libwapcaplet libdom libutf8proc)
+nsurl_LDFLAGS := $(shell pkg-config --libs libwapcaplet libdom libutf8proc)
nsoption_SRCS := utils/log.c utils/nsoption.c test/nsoption.c
nsoption_CFLAGS := -Dnsgtk
.PHONY: all
-all: llcache urldbtest nsurl nsoption
+all: nsurl
+ ./nsurl
llcache: $(addprefix ../,$(llcache_SRCS))
$(CC) $(CFLAGS) $(llcache_CFLAGS) $^ -o $@ $(LDFLAGS) $(llcache_LDFLAGS)
diff --git a/test/llcache.c b/test/llcache.c
index ca9da91..42abb24 100644
--- a/test/llcache.c
+++ b/test/llcache.c
@@ -26,7 +26,6 @@
#include "content/llcache.h"
#include "utils/ring.h"
#include "utils/nsurl.h"
-#include "utils/schedule.h"
#include "utils/url.h"
#include "utils/corestrings.h"
#include "utils/utils.h"
diff --git a/test/nsurl.c b/test/nsurl.c
index 891e5c9..2afe91b 100644
--- a/test/nsurl.c
+++ b/test/nsurl.c
@@ -213,7 +213,7 @@ static const struct test_triplets replace_query_tests[] = {
/**
* Test nsurl
*/
-int main(void)
+int main(int argc, char **argv)
{
nsurl *base;
nsurl *joined;
@@ -227,6 +227,7 @@ int main(void)
nserror err;
verbose_log = true;
+ nslog_init(NULL, &argc, argv);
if (corestrings_init() != NSERROR_OK) {
assert(0 && "Failed to init corestrings.");
diff --git a/test/testament.h b/test/testament.h
new file mode 100644
index 0000000..e69de29
diff --git a/test/urldbtest.c b/test/urldbtest.c
index 88291ce..4536ddd 100644
--- a/test/urldbtest.c
+++ b/test/urldbtest.c
@@ -29,6 +29,7 @@
#include <curl/curl.h>
+#include "utils/errors.h"
#include "image/bitmap.h"
#include "content/content.h"
#include "content/urldb.h"
-----------------------------------------------------------------------
Summary of changes:
Makefile | 5 +++++
test/Makefile | 22 +++++++++++++---------
test/llcache.c | 1 -
test/nsurl.c | 3 ++-
test/urldbtest.c | 1 +
5 files changed, 21 insertions(+), 11 deletions(-)
create mode 100644 test/testament.h
diff --git a/Makefile b/Makefile
index 107e61c..fc3225a 100644
--- a/Makefile
+++ b/Makefile
@@ -824,3 +824,8 @@ install: all-program install-$(TARGET)
docs:
doxygen Docs/Doxyfile
+
+.PHONY:test
+
+test:
+ make -C test
\ No newline at end of file
diff --git a/test/Makefile b/test/Makefile
index cf0f897..7327580 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,4 +1,7 @@
-CFLAGS := -std=c99 -g -O0 -D_BSD_SOURCE -D_POSIX_C_SOURCE -I.. \
+#
+# NetSurf unit tests
+
+CFLAGS := -std=c99 -g -O0 -D_BSD_SOURCE -D_POSIX_C_SOURCE -I. -I.. \
$(shell pkg-config --cflags libcurl)
LDFLAGS := $(shell pkg-config --libs libcurl) -lz
@@ -8,30 +11,31 @@ llcache_LDFLAGS := $(shell pkg-config --libs libparserutils
libwapcaplet libdom)
llcache_SRCS := content/fetch.c content/fetchers/curl.c \
content/fetchers/about.c content/fetchers/data.c \
content/fetchers/resource.c content/llcache.c \
- content/urldb.c desktop/options.c desktop/version.c \
+ content/urldb.c desktop/version.c \
image/image_cache.c \
utils/base64.c utils/corestrings.c utils/hashtable.c \
utils/log.c utils/nsurl.c utils/messages.c utils/url.c \
utils/useragent.c utils/utils.c test/llcache.c
urldbtest_SRCS := content/urldb.c utils/url.c utils/utils.c utils/log.c \
- desktop/options.c utils/messages.c utils/hashtable.c \
+ utils/messages.c utils/hashtable.c \
utils/filename.c utils/nsurl.c utils/corestrings.c \
test/urldbtest.c
-urldbtest_CFLAGS := $(shell pkg-config --cflags libwapcaplet libdom) -O2
-urldbtest_LDFLAGS := $(shell pkg-config --libs libwapcaplet libdom)
+urldbtest_CFLAGS := $(shell pkg-config --cflags libwapcaplet libdom libnsutils) -O2
+urldbtest_LDFLAGS := $(shell pkg-config --libs libwapcaplet libdom libnsutils)
-nsurl_SRCS := utils/corestrings.c utils/log.c utils/nsurl.c utils/idna.c utils/utf8proc.c
test/nsurl.c
-nsurl_CFLAGS := $(shell pkg-config --cflags libwapcaplet libdom)
-nsurl_LDFLAGS := $(shell pkg-config --libs libwapcaplet libdom)
+nsurl_SRCS := utils/corestrings.c utils/log.c utils/nsurl.c utils/idna.c
desktop/version.c test/nsurl.c
+nsurl_CFLAGS := $(shell pkg-config --cflags libwapcaplet libdom libutf8proc)
+nsurl_LDFLAGS := $(shell pkg-config --libs libwapcaplet libdom libutf8proc)
nsoption_SRCS := utils/log.c utils/nsoption.c test/nsoption.c
nsoption_CFLAGS := -Dnsgtk
.PHONY: all
-all: llcache urldbtest nsurl nsoption
+all: nsurl
+ ./nsurl
llcache: $(addprefix ../,$(llcache_SRCS))
$(CC) $(CFLAGS) $(llcache_CFLAGS) $^ -o $@ $(LDFLAGS) $(llcache_LDFLAGS)
diff --git a/test/llcache.c b/test/llcache.c
index ca9da91..42abb24 100644
--- a/test/llcache.c
+++ b/test/llcache.c
@@ -26,7 +26,6 @@
#include "content/llcache.h"
#include "utils/ring.h"
#include "utils/nsurl.h"
-#include "utils/schedule.h"
#include "utils/url.h"
#include "utils/corestrings.h"
#include "utils/utils.h"
diff --git a/test/nsurl.c b/test/nsurl.c
index 891e5c9..2afe91b 100644
--- a/test/nsurl.c
+++ b/test/nsurl.c
@@ -213,7 +213,7 @@ static const struct test_triplets replace_query_tests[] = {
/**
* Test nsurl
*/
-int main(void)
+int main(int argc, char **argv)
{
nsurl *base;
nsurl *joined;
@@ -227,6 +227,7 @@ int main(void)
nserror err;
verbose_log = true;
+ nslog_init(NULL, &argc, argv);
if (corestrings_init() != NSERROR_OK) {
assert(0 && "Failed to init corestrings.");
diff --git a/test/testament.h b/test/testament.h
new file mode 100644
index 0000000..e69de29
diff --git a/test/urldbtest.c b/test/urldbtest.c
index 88291ce..4536ddd 100644
--- a/test/urldbtest.c
+++ b/test/urldbtest.c
@@ -29,6 +29,7 @@
#include <curl/curl.h>
+#include "utils/errors.h"
#include "image/bitmap.h"
#include "content/content.h"
#include "content/urldb.h"
--
NetSurf Browser