chiark / gitweb /
rename recentact to lowvol
[inn-innduct.git] / tests / lib / hstrerror-t.c
1 /* $Id: hstrerror-t.c 5060 2001-12-12 09:20:10Z rra $ */
2 /* hstrerror test suite. */
3
4 #include "config.h"
5 #include <netdb.h>
6 #include <stdio.h>
7
8 #include "libtest.h"
9
10 const char *test_hstrerror(int);
11
12 static void
13 test_error(int n, const char *expected, int error)
14 {
15     ok_string(n, expected, test_hstrerror(error));
16 }
17
18 int
19 main(void)
20 {
21     puts("7");
22
23     test_error(1, "Internal resolver error", -1);
24     test_error(2, "No resolver error", 0);
25     test_error(3, "No address associated with name", NO_ADDRESS);
26     test_error(4, "Resolver error 777777", 777777);
27     test_error(5, "Resolver error -99999", -99999);
28     test_error(6, "", 1000000);
29     test_error(7, "", -100000);
30
31     return 0;
32 }