diff --git a/src/cookies/meson.build b/src/cookies/meson.build index 532a39cb..b17b1d17 100644 --- a/src/cookies/meson.build +++ b/src/cookies/meson.build @@ -7,4 +7,4 @@ test('cookies', t, depends:[exe], env:test_lib, workdir:meson.current_build_dir( parsetstdeps = files('parser.c', 'parsetst.c') -executable('parsetst', parsetstdeps, testdeps, c_args:['-DHAVE_CONFIG_H'], include_directories:['.', '..', '../..']) +executable('parsetst', parsetstdeps, testdeps, dependencies:[iconvdeps], c_args:['-DHAVE_CONFIG_H'], include_directories:['.', '..', '../..']) diff --git a/src/cookies/parsetst.c b/src/cookies/parsetst.c index 05b3fa46..166e8bad 100644 --- a/src/cookies/parsetst.c +++ b/src/cookies/parsetst.c @@ -16,6 +16,18 @@ int get_ctl_handle() return -1; } +char * +gettext(const char *text) +{ + return (char *)text; +} + +int +os_default_charset(void) +{ + return -1; +} + int main(int argc, char *argv[]) { diff --git a/src/document/html/test/meson.build b/src/document/html/test/meson.build index 2ef1df42..5f3f4cc9 100644 --- a/src/document/html/test/meson.build +++ b/src/document/html/test/meson.build @@ -1,2 +1,3 @@ -t = executable('parse-meta-refresh-test', 'parse-meta-refresh-test.c', testdeps, meson.current_source_dir() + '/../parse-meta-refresh.c', c_args:['-DHAVE_CONFIG_H'], include_directories:['.', '..', '../..', '../../..', '../../../..']) +t = executable('parse-meta-refresh-test', 'parse-meta-refresh-test.c', testdeps, meson.current_source_dir() + '/../parse-meta-refresh.c', dependencies:[iconvdeps], +c_args:['-DHAVE_CONFIG_H'], include_directories:['.', '..', '../..', '../../..', '../../../..']) test('parse-meta-refresh', t) diff --git a/src/document/html/test/parse-meta-refresh-test.c b/src/document/html/test/parse-meta-refresh-test.c index debb3ed9..abc43822 100644 --- a/src/document/html/test/parse-meta-refresh-test.c +++ b/src/document/html/test/parse-meta-refresh-test.c @@ -15,7 +15,20 @@ #include "util/memory.h" /* fake tty get function, needed for charsets.c */ -int get_ctl_handle() { +int +get_ctl_handle() { + return -1; +} + +char * +gettext(const char *text) +{ + return (char *)text; +} + +int +os_default_charset(void) +{ return -1; } diff --git a/src/network/ssl/test/match-hostname-test.c b/src/network/ssl/test/match-hostname-test.c index 30fe5711..6b850441 100644 --- a/src/network/ssl/test/match-hostname-test.c +++ b/src/network/ssl/test/match-hostname-test.c @@ -13,7 +13,21 @@ #include "util/string.h" /* fake tty get function, needed for charsets.c */ -int get_ctl_handle() { +int +get_ctl_handle() +{ + return -1; +} + +char * +gettext(const char *text) +{ + return (char *)text; +} + +int +os_default_charset(void) +{ return -1; } diff --git a/src/network/ssl/test/meson.build b/src/network/ssl/test/meson.build index 5450acb8..5fb6df69 100644 --- a/src/network/ssl/test/meson.build +++ b/src/network/ssl/test/meson.build @@ -1,2 +1,3 @@ -t = executable('match-hostname-test', 'match-hostname-test.c', meson.source_root()+'/src/network/ssl/match-hostname.c', testdeps, c_args:['-DHAVE_CONFIG_H'], include_directories:['.', '..', '../..', '../../..', '../../../..']) +t = executable('match-hostname-test', 'match-hostname-test.c', meson.source_root()+'/src/network/ssl/match-hostname.c', testdeps, dependencies:[iconvdeps], +c_args:['-DHAVE_CONFIG_H'], include_directories:['.', '..', '../..', '../../..', '../../../..']) test('match-hostname-test', t) diff --git a/src/protocol/ftp/ftp-parser.c b/src/protocol/ftp/ftp-parser.c index fba0cf66..aed7ce1c 100644 --- a/src/protocol/ftp/ftp-parser.c +++ b/src/protocol/ftp/ftp-parser.c @@ -16,7 +16,21 @@ #include "util/test.h" /* fake tty get function, needed for charsets.c */ -int get_ctl_handle() { +int +get_ctl_handle() +{ + return -1; +} + +char * +gettext(const char *text) +{ + return (char *)text; +} + +int +os_default_charset(void) +{ return -1; } diff --git a/src/protocol/ftp/meson.build b/src/protocol/ftp/meson.build index 2303b003..ca9773d7 100644 --- a/src/protocol/ftp/meson.build +++ b/src/protocol/ftp/meson.build @@ -1,6 +1,6 @@ srcs += files('ftp.c', 'parse.c') -exe = executable('ftp-parser', 'ftp-parser.c', 'parse.c', meson.source_root()+'/src/protocol/date.c', testdeps, +exe = executable('ftp-parser', 'ftp-parser.c', 'parse.c', meson.source_root()+'/src/protocol/date.c', testdeps, dependencies:[iconvdeps], c_args:['-DHAVE_CONFIG_H'], cpp_args:['-DHAVE_CONFIG_H'], include_directories:['.','../..','../../..'], build_by_default:false) diff --git a/src/protocol/test/meson.build b/src/protocol/test/meson.build index 18aadcac..b34b5199 100644 --- a/src/protocol/test/meson.build +++ b/src/protocol/test/meson.build @@ -2,36 +2,8 @@ idna_dep = dependency('libidn') uri_test_files = files('uri-test.c', 'stub.c', meson.current_source_dir()+'/../protocol.cpp', meson.current_source_dir()+'/../uri.c') -if conf_data.get('CONFIG_NLS') and not conf_data.get('CONFIG_GETTEXT') - uri_test_files += files( -meson.source_root()+'/src/intl/gettext/bindtextdom.c', -meson.source_root()+'/src/intl/gettext/dcgettext.c', -meson.source_root()+'/src/intl/gettext/dcigettext.c', -meson.source_root()+'/src/intl/gettext/dcngettext.c', -meson.source_root()+'/src/intl/gettext/dgettext.c', -meson.source_root()+'/src/intl/gettext/dngettext.c', -meson.source_root()+'/src/intl/gettext/explodename.c', -meson.source_root()+'/src/intl/gettext/finddomain.c', -meson.source_root()+'/src/intl/gettext/gettext.c', -meson.source_root()+'/src/intl/gettext/intl-compat.c', -meson.source_root()+'/src/intl/gettext/l10nflist.c', -meson.source_root()+'/src/intl/gettext/libintl.c', -meson.source_root()+'/src/intl/gettext/loadmsgcat.c', -meson.source_root()+'/src/intl/gettext/localcharset.c', -meson.source_root()+'/src/intl/gettext/localealias.c', -meson.source_root()+'/src/intl/gettext/ngettext.c', -meson.source_root()+'/src/intl/gettext/plural.c', -meson.source_root()+'/src/intl/gettext/textdomain.c') -endif - -if conf_data.get('CONFIG_NLS') and conf_data.get('CONFIG_GETTEXT') - uri_test_files += files( -meson.source_root()+'/src/intl/libintl.c', -meson.source_root()+'/src/util/env.c') -endif - exe = executable('uri-test', uri_test_files, -testdeps, dependencies: [idna_dep, mozjsdeps], +testdeps, dependencies: [iconvdeps, idna_dep, mozjsdeps, wattdeps], c_args:['-DHAVE_CONFIG_H'], cpp_args:['-DHAVE_CONFIG_H'], include_directories:['.', '..', '../..', '../../..', '../../../..']) t = find_program('test-normalize-uri') test_lib = environment({'TEST_LIB':meson.source_root()+'/test/libtest.sh'}) diff --git a/src/protocol/test/stub.c b/src/protocol/test/stub.c index f0869219..af2997b8 100644 --- a/src/protocol/test/stub.c +++ b/src/protocol/test/stub.c @@ -47,6 +47,7 @@ struct program { STUB_MODULE(auth_module); STUB_MODULE(bittorrent_protocol_module); STUB_MODULE(cgi_protocol_module); +STUB_MODULE(dgi_protocol_module); STUB_MODULE(file_protocol_module); STUB_MODULE(finger_protocol_module); STUB_MODULE(fsp_protocol_module); @@ -83,6 +84,7 @@ 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_HANDLER(dgi_protocol_handler); STUB_PROTOCOL_EXTERNAL_HANDLER(ecmascript_protocol_handler); STUB_PROTOCOL_HANDLER(file_protocol_handler); STUB_PROTOCOL_HANDLER(finger_protocol_handler); diff --git a/src/protocol/test/uri-test.c b/src/protocol/test/uri-test.c index 0b1bfb19..6fa157ed 100644 --- a/src/protocol/test/uri-test.c +++ b/src/protocol/test/uri-test.c @@ -19,11 +19,26 @@ get_default_protocol(void) return "file://"; } +char * +gettext(const char *text) +{ + return (char *)text; +} + +int +os_default_charset(void) +{ + return -1; +} + +int current_charset; + #include "protocol/uri.h" #include "util/string.h" /* fake tty get function, needed for charsets.c */ -int get_ctl_handle() +int +get_ctl_handle() { return -1; }