diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2016-09-03 15:08:13 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2016-09-03 15:08:13 +0000 |
commit | a6533d88996e7570cf04db0d99b6012d25a953d3 (patch) | |
tree | cb1552d6fa59b30201907edc56208f6fe720c283 /testcode/unitmain.c | |
parent | 21d2013cbd382bc99b9c1a31146ec76a2792b92c (diff) |
Notes
Diffstat (limited to 'testcode/unitmain.c')
-rw-r--r-- | testcode/unitmain.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/testcode/unitmain.c b/testcode/unitmain.c index 0b32dcd86903..e8bb898b0d74 100644 --- a/testcode/unitmain.c +++ b/testcode/unitmain.c @@ -380,6 +380,28 @@ config_memsize_test(void) unit_assert( cfg_parse_memsize("0 Gb", &v) && v==0*1024*1024); } +/** test config_file: test tag code */ +static void +config_tag_test(void) +{ + unit_show_func("util/config_file.c", "taglist_intersect"); + unit_assert( taglist_intersect( + (uint8_t*)"\000\000\000", 3, (uint8_t*)"\001\000\001", 3 + ) == 0); + unit_assert( taglist_intersect( + (uint8_t*)"\000\000\001", 3, (uint8_t*)"\001\000\001", 3 + ) == 1); + unit_assert( taglist_intersect( + (uint8_t*)"\001\000\000", 3, (uint8_t*)"\001\000\001", 3 + ) == 1); + unit_assert( taglist_intersect( + (uint8_t*)"\001", 1, (uint8_t*)"\001\000\001", 3 + ) == 1); + unit_assert( taglist_intersect( + (uint8_t*)"\001\000\001", 3, (uint8_t*)"\001", 1 + ) == 1); +} + #include "util/rtt.h" /** test RTT code */ static void @@ -564,9 +586,6 @@ main(int argc, char* argv[]) printf("Start of %s unit test.\n", PACKAGE_STRING); #ifdef HAVE_SSL ERR_load_crypto_strings(); -# ifdef HAVE_OPENSSL_CONFIG - OPENSSL_config("unbound"); -# endif # ifdef USE_GOST (void)sldns_key_EVP_load_gost_id(); # endif @@ -580,6 +599,7 @@ main(int argc, char* argv[]) verify_test(); net_test(); config_memsize_test(); + config_tag_test(); dname_test(); rtt_test(); anchors_test(); @@ -602,7 +622,6 @@ main(int argc, char* argv[]) CONF_modules_free(); # endif CRYPTO_cleanup_all_ex_data(); - ERR_remove_state(0); ERR_free_strings(); RAND_cleanup(); #elif defined(HAVE_NSS) |