mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-28 23:49:44 +08:00
few more tests for match_prefix()
This commit is contained in:
parent
c88f736971
commit
d1806370bd
@ -21,6 +21,8 @@ static void test_match_prefix(void) {
|
|||||||
assert(match_prefix("$", 1, "x") == -1);
|
assert(match_prefix("$", 1, "x") == -1);
|
||||||
assert(match_prefix("*$", 2, "x") == 1);
|
assert(match_prefix("*$", 2, "x") == 1);
|
||||||
assert(match_prefix("/$", 2, "/") == 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("*", 1, "/hello/") == 0);
|
||||||
assert(match_prefix("**.a$|**.b$", 11, "/a/b.b/") == -1);
|
assert(match_prefix("**.a$|**.b$", 11, "/a/b.b/") == -1);
|
||||||
assert(match_prefix("**.a$|**.b$", 11, "/a/b.b") == 6);
|
assert(match_prefix("**.a$|**.b$", 11, "/a/b.b") == 6);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user