aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2015-04-28 22:15:24 -0300
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2015-04-28 22:15:24 -0300
commitbc14a2af3b096e780cf9a888833100a77156d55e (patch)
treec65d074ddb92cd1cb4b72754a4e0dafc2f04b82d
parent582cbc6cf67919ec189098817ab1e4541c8e761d (diff)
downloadblogc-bc14a2af3b096e780cf9a888833100a77156d55e.tar.gz
blogc-bc14a2af3b096e780cf9a888833100a77156d55e.tar.bz2
blogc-bc14a2af3b096e780cf9a888833100a77156d55e.zip
minor fixes for freebsd
-rw-r--r--src/template-parser.c2
-rw-r--r--tests/check_renderer.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/template-parser.c b/src/template-parser.c
index a91182f..42fc5e2 100644
--- a/src/template-parser.c
+++ b/src/template-parser.c
@@ -271,7 +271,7 @@ 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 syntax. Must end with '%}'.");
+ "Invalid statement syntax. Must end with '%%}'.");
break;
case TEMPLATE_VARIABLE_START:
diff --git a/tests/check_renderer.c b/tests/check_renderer.c
index 681b821..1d3c205 100644
--- a/tests/check_renderer.c
+++ b/tests/check_renderer.c
@@ -379,7 +379,7 @@ static void
test_format_date(void **state)
{
b_trie_t *g = b_trie_new(free);
- b_trie_insert(g, "DATE_FORMAT", b_strdup("%H -- %j"));
+ b_trie_insert(g, "DATE_FORMAT", b_strdup("%H -- %M"));
b_trie_t *l = b_trie_new(free);
b_trie_insert(l, "DATE", b_strdup("2015-01-02 03:04:05"));
b_trie_insert(l, "DATE_FORMAT", b_strdup("%R"));
@@ -395,11 +395,11 @@ static void
test_format_date_with_global_format(void **state)
{
b_trie_t *g = b_trie_new(free);
- b_trie_insert(g, "DATE_FORMAT", b_strdup("%H -- %j"));
+ b_trie_insert(g, "DATE_FORMAT", b_strdup("%H -- %M"));
b_trie_t *l = b_trie_new(free);
b_trie_insert(l, "DATE", b_strdup("2015-01-02 03:04:05"));
char *date = blogc_format_date(g, l);
- assert_string_equal(date, "03 -- 002");
+ assert_string_equal(date, "03 -- 04");
free(date);
b_trie_free(g);
b_trie_free(l);