fzy
terminal fuzzy finder picker
git clone https://9o.is/git/fzy.git
commit f6a99efc1e52eec4720b12620781abea9a117f54 parent 638ceadba7ae5ba0ab1ae222d22ff566d08c1552 Author: John Hawthorn <john.hawthorn@gmail.com> Date: Sat, 26 Jul 2014 21:42:51 -0700 Test for exact match Diffstat:
| M | fzytest.c | | | 11 | +++++++++++ |
1 file changed, 11 insertions(+), 0 deletions(-)
diff --git a/fzytest.c b/fzytest.c @@ -62,6 +62,16 @@ int test_positions_2(){ return 0; } +int test_positions_exact(){ + size_t positions[3]; + match_positions("foo", "foo", positions); + assert(positions[0] == 0); + assert(positions[1] == 1); + assert(positions[2] == 2); + + return 0; +} + void summary(){ printf("%i tests, %i assertions, %i failures\n", testsrun, assertionsrun, testsfailed); } @@ -74,6 +84,7 @@ int main(int argc, char *argv[]){ runtest(test_scoring); runtest(test_positions_1); runtest(test_positions_2); + runtest(test_positions_exact); summary();