mirror of
https://github.com/cesanta/slre.git
synced 2024-11-17 08:55:30 +00:00
Added couple of failing tests for https://github.com/cesanta/slre/issues/6
This commit is contained in:
parent
402300e070
commit
b017911490
4
slre.c
4
slre.c
@ -528,6 +528,10 @@ int main(void) {
|
||||
ASSERT(slre_match("l$", "fooklmn", 7, NULL, 0) == SLRE_NO_MATCH);
|
||||
ASSERT(slre_match(".$", "fooklmn", 7, NULL, 0) == 7);
|
||||
ASSERT(slre_match("a?", "fooklmn", 7, NULL, 0) == 0);
|
||||
ASSERT(slre_match("^a*CONTROL", "CONTROL", 7, NULL, 0) == 7);
|
||||
ASSERT(slre_match("^[a]*CONTROL", "CONTROL", 7, NULL, 0) == 7);
|
||||
ASSERT(slre_match("^(a*)CONTROL", "CONTROL", 7, NULL, 0) == 7);
|
||||
ASSERT(slre_match("^(a*)?CONTROL", "CONTROL", 7, NULL, 0) == 7);
|
||||
|
||||
ASSERT(slre_match("\\_", "abc", 3, NULL, 0) == SLRE_INVALID_METACHARACTER);
|
||||
ASSERT(slre_match("+", "fooklmn", 7, NULL, 0) == SLRE_UNEXPECTED_QUANTIFIER);
|
||||
|
Loading…
Reference in New Issue
Block a user