12 struct kbdfile *fp = kbdfile_new(NULL);
14 error(EXIT_FAILURE, 0, "unable to create kbdfile");
16 const char *const dirpath[] = { "", DATADIR "/findfile/test_0/keymaps/**", 0 };
17 const char *const suffixes[] = { "", ".kmap", ".map", 0 };
19 const char *expect = DATADIR "/findfile/test_0/keymaps/i386/qwertz/test2";
21 int rc = kbdfile_find((char *)"test2", (char **) dirpath, (char **) suffixes, fp);
24 error(EXIT_FAILURE, 0, "unable to find file");
26 if (strcmp(expect, kbdfile_get_pathname(fp)) != 0)
27 error(EXIT_FAILURE, 0, "unexpected file: %s (expected %s)", kbdfile_get_pathname(fp), expect);