Handle . in parse_term()
This commit is contained in:
@@ -84,6 +84,19 @@ static void abc_is_parsed_as_sequence_of_unquantified_literals(void)
|
||||
regex_free_children(&r);
|
||||
}
|
||||
|
||||
static void dot_is_parsed_as_unquantified_wildcard_term(void)
|
||||
{
|
||||
regex_t r = { 0 };
|
||||
const int result = PARSE_REGEX_STRING(".", &r);
|
||||
ASSERT_NE(-1, result);
|
||||
|
||||
ASSERT_EQ(1, r.sequence.len);
|
||||
ASSERT_EQ(QUANTIFIER_NONE, r.sequence.contents[0].quantifier);
|
||||
ASSERT_EQ(TERM_TYPE_WILDCARD, r.sequence.contents[0].type);
|
||||
|
||||
regex_free_children(&r);
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
TESTING_BEGIN();
|
||||
@@ -93,5 +106,6 @@ int main(void)
|
||||
a_is_parsed_as_unquantified_literal();
|
||||
b_is_parsed_as_unquantified_literal();
|
||||
abc_is_parsed_as_sequence_of_unquantified_literals();
|
||||
dot_is_parsed_as_unquantified_wildcard_term();
|
||||
return TESTING_END();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user