radare2/libr/util/t/glob.c
pancake 6099a388f6 * Reimplement r_flag using RHashTable64
- Much faster (over ninethousand)
  - Must do the same for code analysis stuff
  - Added test case
* Implement r_str_glob ()
2011-05-21 21:05:21 +02:00

17 lines
340 B
C

#include <r_util.h>
void chk(const char *s, const char *g, int o) {
int r = r_str_glob (s, g);
printf ("%d %d %s (%s)\n", r, o, s, g);
}
main () {
chk ("foo.c", "*.c", 1);
chk ("foo.c", "*.d", 0);
chk ("foo.c", "foo*", 1);
chk ("foo.c", "*oo*", 1);
chk ("foo.c", "*uu*", 0);
chk ("foo.c", "f*c", 1);
chk ("foo.c", "f*d", 0);
}