Commit d1806370 authored by Sergey Lyubka's avatar Sergey Lyubka

few more tests for match_prefix()

parent c88f7369
......@@ -21,6 +21,8 @@ static void test_match_prefix(void) {
assert(match_prefix("$", 1, "x") == -1);
assert(match_prefix("*$", 2, "x") == 1);
assert(match_prefix("/$", 2, "/") == 1);
assert(match_prefix("**/$", 4, "/a/b/c") == -1);
assert(match_prefix("**/$", 4, "/a/b/") == 5);
assert(match_prefix("*", 1, "/hello/") == 0);
assert(match_prefix("**.a$|**.b$", 11, "/a/b.b/") == -1);
assert(match_prefix("**.a$|**.b$", 11, "/a/b.b") == 6);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment