1 /* bsd-interf.c: test BSD interface. */
3 #ifndef _POSIX_SOURCE /* whole file */
8 test_berk_search (pattern, string)
12 const char *return_value = re_comp (pattern);
14 if (return_value != 0)
16 printf ("This didn't compile: `%s'.\n", pattern);
17 printf (" The error message was: `%s'.\n", return_value);
20 if (test_should_match && re_exec (string) != strlen (string))
22 printf ("Should have matched but didn't:\n");
23 printf (" The pattern was: %s.\n", pattern);
25 printf (" The string was: `%s'.'n", string);
27 printf (" The string was empty.\n");
35 test_berk_search ("a", "ab");
38 #endif /* _POSIX_SOURCE */