mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-22 06:21:45 +03:00
Fix testsuite
svn path=/trunk/netsurf/; revision=11288
This commit is contained in:
parent
e66211f669
commit
4cd21d9934
@ -2,18 +2,19 @@ CFLAGS := -std=c99 -g -O0 -D_BSD_SOURCE -D_POSIX_C_SOURCE -I.. \
|
||||
`pkg-config --cflags libxml-2.0 libcurl`
|
||||
LDFLAGS := `pkg-config --libs libxml-2.0 libcurl`
|
||||
|
||||
llcache_CFLAGS := `pkg-config --cflags libparserutils`
|
||||
llcache_LDFLAGS := `pkg-config --libs libparserutils`
|
||||
llcache_CFLAGS := `pkg-config --cflags libparserutils libwapcaplet`
|
||||
llcache_LDFLAGS := `pkg-config --libs libparserutils libwapcaplet`
|
||||
|
||||
llcache_SRCS := content/fetch.c content/fetchers/fetch_curl.c \
|
||||
content/fetchers/fetch_data.c content/llcache.c \
|
||||
content/urldb.c desktop/options.c desktop/version.c \
|
||||
utils/base64.c utils/hashtable.c utils/messages.c \
|
||||
utils/url.c utils/useragent.c utils/utf8.c utils/utils.c \
|
||||
test/llcache.c
|
||||
utils/base64.c utils/hashtable.c utils/log.c \
|
||||
utils/messages.c utils/url.c utils/useragent.c utils/utf8.c \
|
||||
utils/utils.c test/llcache.c
|
||||
|
||||
urldbtest_SRCS := content/urldb.c utils/url.c utils/utils.c utils/messages.c \
|
||||
utils/hashtable.c utils/filename.c test/urldbtest.c
|
||||
urldbtest_SRCS := content/urldb.c utils/url.c utils/utils.c utils/log.c \
|
||||
utils/messages.c utils/hashtable.c utils/filename.c \
|
||||
test/urldbtest.c
|
||||
|
||||
urldbtest_CFLAGS := -O2
|
||||
urldbtest_LDFLAGS :=
|
||||
|
@ -99,11 +99,19 @@ char *url_to_path(const char *url)
|
||||
*
|
||||
* URLdb should have a cookies update event + handler registration
|
||||
*/
|
||||
bool cookies_update(const char *domain, const struct cookie_data *data)
|
||||
bool cookies_schedule_update(const struct cookie_data *data)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/* desktop/cookies.h -- used by urldb
|
||||
*
|
||||
* URLdb should have a cookies removal handler registration
|
||||
*/
|
||||
void cookies_remove(const struct cookie_data *data)
|
||||
{
|
||||
}
|
||||
|
||||
/* image/bitmap.h -- used by urldb
|
||||
*
|
||||
* URLdb shouldn't care about bitmaps.
|
||||
@ -113,33 +121,14 @@ void bitmap_destroy(void *bitmap)
|
||||
{
|
||||
}
|
||||
|
||||
/* desktop/tree.h -- used by options.c
|
||||
/* content/fetchers/fetch_file.h -- used by fetcher core
|
||||
*
|
||||
* Why on earth is tree loading and saving in options.c?
|
||||
* Simpler to stub this than haul in all the file fetcher's dependencies
|
||||
*/
|
||||
void tree_initialise(struct tree *tree)
|
||||
void fetch_file_register(void)
|
||||
{
|
||||
}
|
||||
|
||||
/* desktop/tree.h */
|
||||
struct node *tree_create_folder_node(struct node *parent, const char *title)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* desktop/tree.h */
|
||||
struct node *tree_create_URL_node(struct node *parent, const char *url,
|
||||
const struct url_data *data, const char *title)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* desktop/tree.h */
|
||||
struct node_element *tree_find_element(struct node *node, node_element_data d)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* test: protocol handler *
|
||||
******************************************************************************/
|
||||
|
@ -46,11 +46,15 @@
|
||||
int option_expire_url = 0;
|
||||
bool verbose_log = true;
|
||||
|
||||
bool cookies_update(const char *domain, const struct cookie_data *data)
|
||||
bool cookies_schedule_update(const struct cookie_data *data)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void cookies_remove(const struct cookie_data *data)
|
||||
{
|
||||
}
|
||||
|
||||
void die(const char *error)
|
||||
{
|
||||
printf("die: %s\n", error);
|
||||
@ -172,6 +176,9 @@ int main(void)
|
||||
assert(urldb_add_url("http://www2.2checkout.com/"));
|
||||
assert(urldb_get_url("http://www2.2checkout.com/"));
|
||||
|
||||
// assert(urldb_add_url("http://2.bp.blogspot.com/_448y6kVhntg/TSekubcLJ7I/AAAAAAAAHJE/yZTsV5xT5t4/s1600/covers.jpg"));
|
||||
// assert(urldb_get_url("http://2.bp.blogspot.com/_448y6kVhntg/TSekubcLJ7I/AAAAAAAAHJE/yZTsV5xT5t4/s1600/covers.jpg"));
|
||||
|
||||
/* Valid path */
|
||||
assert(urldb_set_cookie("name=value;Path=/\r\n", "http://www.google.com/", NULL));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user