mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-08-17 21:25:50 +02:00
debug work.
git-svn-id: file:///svn/unbound/trunk@371 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
@@ -361,6 +361,42 @@ dname_test_dname_lab_cmp()
|
||||
unit_assert(ml == 4);
|
||||
}
|
||||
|
||||
/** test dname_subdomain_c */
|
||||
static void
|
||||
dname_test_subdomain()
|
||||
{
|
||||
unit_assert(dname_subdomain_c(
|
||||
(uint8_t*)"",
|
||||
(uint8_t*)""));
|
||||
unit_assert(dname_subdomain_c(
|
||||
(uint8_t*)"\003com",
|
||||
(uint8_t*)""));
|
||||
unit_assert(!dname_subdomain_c(
|
||||
(uint8_t*)"",
|
||||
(uint8_t*)"\003com"));
|
||||
unit_assert(dname_subdomain_c(
|
||||
(uint8_t*)"\007example\003com",
|
||||
(uint8_t*)"\003com"));
|
||||
unit_assert(!dname_subdomain_c(
|
||||
(uint8_t*)"\003com",
|
||||
(uint8_t*)"\007example\003com"));
|
||||
unit_assert(dname_subdomain_c(
|
||||
(uint8_t*)"\007example\003com",
|
||||
(uint8_t*)""));
|
||||
unit_assert(!dname_subdomain_c(
|
||||
(uint8_t*)"\003net",
|
||||
(uint8_t*)"\003com"));
|
||||
unit_assert(!dname_subdomain_c(
|
||||
(uint8_t*)"\003net",
|
||||
(uint8_t*)"\003org"));
|
||||
unit_assert(!dname_subdomain_c(
|
||||
(uint8_t*)"\007example\003net",
|
||||
(uint8_t*)"\003org"));
|
||||
unit_assert(!dname_subdomain_c(
|
||||
(uint8_t*)"\003net",
|
||||
(uint8_t*)"\007example\003org"));
|
||||
}
|
||||
|
||||
/** test dname_strict_subdomain */
|
||||
static void
|
||||
dname_test_strict_subdomain()
|
||||
@@ -409,5 +445,6 @@ void dname_test()
|
||||
dname_test_dname_lab_cmp();
|
||||
dname_test_pkt_dname_len(buff);
|
||||
dname_test_strict_subdomain();
|
||||
dname_test_subdomain();
|
||||
ldns_buffer_free(buff);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user