mud/fluffos-2.23-ds03/testsuite/single/tests/efuns/match_path.c
2020-09-06 05:43:07 -07:00

12 lines
400 B
C

void do_tests() {
mapping m = ([ "foo/" : 1, "bar" : 2, "bazz/foo" : 3, "foo/bar/bazz" : 4]);
ASSERT(!match_path(m, "kajdfj"));
ASSERT(match_path(m, "bar") == 2);
ASSERT(match_path(m, "bar/") == 2);
ASSERT(match_path(m, "bazz//foo") == 3);
ASSERT(match_path(m, "bazz/foo//") == 3);
ASSERT(match_path(m, "foo/bar") == 1);
ASSERT(match_path(m, "foo/bar/bazz") == 4);
}