summaryrefslogtreecommitdiffstats
path: root/avahi-common/domain-test.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-10-23 20:21:39 +0000
committerLennart Poettering <lennart@poettering.net>2005-10-23 20:21:39 +0000
commite865e3dba3c6ee5de5581dbfbafc025aa5c9947e (patch)
tree7630d4d1b2f9982d1c5df4dad767ea7511ad33ee /avahi-common/domain-test.c
parent0d0c9486e3fe26fdd67624ee57961ba2d5846ebb (diff)
* correctly handle empty domain names (i.e. the root zone)
* fix memory initialization error in wide-area.c * make server_add_xx() functions atomic, i.e. clean up half-created entries on failure * add some more validity checking macros and change everything to make use of them * clean up avahi_server_add_address() * change some functions from domain.[ch] to work on a stack buffer instead of malloced memory * update avahi-test.c a little * replace avahi_reverse_lookup_name_{ipv4,ipv6}() with a single function avahi_reverse_lookup_name() * remove avahi_server_add_dns_server_name() from public API git-svn-id: file:///home/lennart/svn/public/avahi/trunk@845 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-common/domain-test.c')
-rw-r--r--avahi-common/domain-test.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/avahi-common/domain-test.c b/avahi-common/domain-test.c
index f1313cb..279be72 100644
--- a/avahi-common/domain-test.c
+++ b/avahi-common/domain-test.c
@@ -110,5 +110,12 @@ int main(int argc, char *argv[]) {
assert(avahi_is_valid_host_name("sfooo."));
assert(avahi_is_valid_host_name("sfooo"));
+ assert(avahi_is_valid_domain_name("."));
+ assert(avahi_is_valid_domain_name(""));
+
+ assert(avahi_normalize_name(".", t, sizeof(t)));
+ assert(avahi_normalize_name("", t, sizeof(t)));
+
+
return 0;
}