aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2016-07-03 03:59:29 +0200
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2016-07-03 03:59:29 +0200
commita8ec8e389166adc1231930028bf845da5f9f40ef (patch)
treee7ffe0864ab6e0db213afcb0e2a260d27b663d69
parent9acb03e669e20180b9bc95ca02b21460761fef87 (diff)
downloadblogc-a8ec8e389166adc1231930028bf845da5f9f40ef.tar.gz
blogc-a8ec8e389166adc1231930028bf845da5f9f40ef.tar.bz2
blogc-a8ec8e389166adc1231930028bf845da5f9f40ef.zip
template-parser: fixed error message
-rw-r--r--src/template-parser.c4
-rw-r--r--tests/check_template_parser.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/template-parser.c b/src/template-parser.c
index 344e398..de6eb52 100644
--- a/src/template-parser.c
+++ b/src/template-parser.c
@@ -320,8 +320,8 @@ blogc_template_parse(const char *src, size_t src_len, blogc_error_t **err)
*err = blogc_error_parser(BLOGC_ERROR_TEMPLATE_PARSER, src,
src_len, current,
"Invalid statement type: Allowed types are: 'block', "
- "'endblock', 'ifdef', 'ifndef', 'endif', 'foreach' and "
- "'endforeach'.");
+ "'endblock', 'ifdef', 'ifndef', 'else', 'endif', 'foreach' "
+ "and 'endforeach'.");
break;
case TEMPLATE_BLOCK_BLOCK_TYPE_START:
diff --git a/tests/check_template_parser.c b/tests/check_template_parser.c
index e94b9c7..d2d5e8d 100644
--- a/tests/check_template_parser.c
+++ b/tests/check_template_parser.c
@@ -576,7 +576,7 @@ test_template_parse_invalid_block_name(void **state)
assert_int_equal(err->type, BLOGC_ERROR_TEMPLATE_PARSER);
assert_string_equal(err->msg,
"Invalid statement type: Allowed types are: 'block', 'endblock', 'ifdef', "
- "'ifndef', 'endif', 'foreach' and 'endforeach'.\n"
+ "'ifndef', 'else', 'endif', 'foreach' and 'endforeach'.\n"
"Error occurred near line 1, position 10: {% chunda %}");
blogc_error_free(err);
}