fzy
terminal fuzzy finder picker
git clone https://9o.is/git/fzy.git
commit 9bce793229d8ab18b9f36071269dd718ba000791 parent e1aeeeb394079095fb10ad0880cbb81d048b6b15 Author: John Hawthorn <john.hawthorn@gmail.com> Date: Mon, 7 Dec 2015 20:34:23 -0800 Additional test for position Diffstat:
| M | fzytest.c | | | 10 | ++++++++++ |
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git a/fzytest.c b/fzytest.c @@ -100,6 +100,15 @@ void test_positions_4() { assert(positions[1] == 7); } +void test_positions_5() { + size_t positions[3]; + match_positions("abc", "a a b c c", positions); + assert(positions[0] == 2); + assert(positions[1] == 4); + assert(positions[2] == 6); +} + + void test_positions_exact() { size_t positions[3]; match_positions("foo", "foo", positions); @@ -242,6 +251,7 @@ int main(int argc, char *argv[]) { runtest(test_positions_2); runtest(test_positions_3); runtest(test_positions_4); + runtest(test_positions_5); runtest(test_positions_exact); runtest(test_choices_empty);