fix mac os x callback without parent bug

This commit is contained in:
pantor
2018-03-20 16:36:11 +01:00
parent cfa0e5cbfe
commit 73a40cf1b1
3 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -158,7 +158,7 @@ TEST_CASE("match-functions") {
}
TEST_CASE("create-regex-functions") {
CHECK( inja::Parser::function_regex("upper", 1).pattern() == "\\s*upper\\((.*)\\)\\s*" );
CHECK( inja::Parser::function_regex("upper", 0).pattern() == "\\s*(?:upper|upper\\(\\))\\s*" );
CHECK( inja::Parser::function_regex("lower", 2).pattern() == "\\s*lower\\((.*),(.*)\\)\\s*" );
CHECK( inja::Parser::function_regex("upper", 1).pattern() == "\\s*upper(?:\\((.*)\\))\\s*" );
CHECK( inja::Parser::function_regex("upper", 0).pattern() == "\\s*upper(?:\\(\\))?\\s*" );
CHECK( inja::Parser::function_regex("lower", 2).pattern() == "\\s*lower(?:\\((.*),(.*)\\))\\s*" );
}