Add changelog.
[glibc.git] / misc / bug-hsearch1.c
blob6097b5ad041020a247102efa09285a4944bd54c3
1 #include <search.h>
2 #include <stdio.h>
4 static int
5 do_test (void)
7 if (hcreate (1) == 0)
9 puts ("hcreate failed");
10 return 1;
12 ENTRY e;
13 e.key = (char *) "a";
14 e.data = (char *) "b";
15 if (hsearch (e, ENTER) == NULL)
17 puts ("ENTER failed");
18 return 1;
20 ENTRY s;
21 s.key = (char *) "c";
22 if (hsearch (s, FIND) != NULL)
24 puts ("FIND succeeded");
25 return 1;
27 return 0;
30 #define TEST_FUNCTION do_test ()
31 #include "../test-skeleton.c"