10 main(int __attribute__((unused)) argc, char **argv)
12 set_progname(argv[0]);
13 struct kbdfile *fp = kbdfile_new(NULL);
15 kbd_error(EXIT_FAILURE, 0, "unable to create kbdfile");
17 const char *const dirpath[] = { "", DATADIR "/findfile/test_0/keymaps/**", 0 };
18 const char *const suffixes[] = { "", ".kmap", ".map", 0 };
20 const char *expect = DATADIR "/findfile/test_0/keymaps/i386/qwertz/test2";
22 int rc = kbdfile_find((char *)"test2", (char **) dirpath, (char **) suffixes, fp);
25 kbd_error(EXIT_FAILURE, 0, "unable to find file");
27 if (strcmp(expect, kbdfile_get_pathname(fp)) != 0)
28 kbd_error(EXIT_FAILURE, 0, "unexpected file: %s (expected %s)", kbdfile_get_pathname(fp), expect);