aboutsummaryrefslogtreecommitdiffstats
path: root/tests/blogc-make/check_settings.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2017-08-03 02:44:36 +0200
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2017-08-03 02:44:36 +0200
commit59e1df233e351a91240c02ac55e8d97bda2f0e43 (patch)
tree846932a4e7761dd93188d1533095f252246c83f3 /tests/blogc-make/check_settings.c
parent803eb202e9d2d96fbb0de6f0514db2f0ab959d11 (diff)
downloadblogc-59e1df233e351a91240c02ac55e8d97bda2f0e43.tar.gz
blogc-59e1df233e351a91240c02ac55e8d97bda2f0e43.tar.bz2
blogc-59e1df233e351a91240c02ac55e8d97bda2f0e43.zip
make: added 'html_order' and 'atom_order' settings
these settings are used to change the order of the posts on the listings. by default, users are supposed to list their posts from older to newer in the blogcfile, and blogc-make will list them on descending order, both for html listings and atom listings.
Diffstat (limited to 'tests/blogc-make/check_settings.c')
-rw-r--r--tests/blogc-make/check_settings.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/blogc-make/check_settings.c b/tests/blogc-make/check_settings.c
index 4016e15..6eaaaec 100644
--- a/tests/blogc-make/check_settings.c
+++ b/tests/blogc-make/check_settings.c
@@ -126,7 +126,7 @@ test_settings2(void **state)
assert_string_equal(bc_trie_lookup(s->global, "SITE_TITLE"), "Fuuuuuuuuu");
assert_string_equal(bc_trie_lookup(s->global, "SITE_TAGLINE"), "My cool tagline");
assert_string_equal(bc_trie_lookup(s->global, "BASE_DOMAIN"), "http://example.com");
- assert_int_equal(bc_trie_size(s->settings), 13);
+ assert_int_equal(bc_trie_size(s->settings), 15);
assert_string_equal(bc_trie_lookup(s->settings, "source_ext"), ".txt");
assert_string_equal(bc_trie_lookup(s->settings, "html_ext"), "/index.html");
assert_string_equal(bc_trie_lookup(s->settings, "content_dir"), "guda");
@@ -141,6 +141,8 @@ test_settings2(void **state)
assert_string_equal(bc_trie_lookup(s->settings, "pagination_prefix"), "page");
assert_string_equal(bc_trie_lookup(s->settings, "post_prefix"), "post");
assert_string_equal(bc_trie_lookup(s->settings, "tag_prefix"), "tag");
+ assert_string_equal(bc_trie_lookup(s->settings, "html_order"), "DESC");
+ assert_string_equal(bc_trie_lookup(s->settings, "atom_order"), "DESC");
assert_non_null(s->posts);
assert_string_equal(s->posts[0], "aaaa");
assert_string_equal(s->posts[1], "bbbb");
@@ -213,7 +215,7 @@ test_settings_env2(void **state)
assert_string_equal(bc_trie_lookup(s->global, "SITE_TITLE"), "Fuuuuuuuuu");
assert_string_equal(bc_trie_lookup(s->global, "SITE_TAGLINE"), "My cool tagline");
assert_string_equal(bc_trie_lookup(s->global, "BASE_DOMAIN"), "http://example.com");
- assert_int_equal(bc_trie_size(s->settings), 13);
+ assert_int_equal(bc_trie_size(s->settings), 15);
assert_string_equal(bc_trie_lookup(s->settings, "source_ext"), ".txt");
assert_string_equal(bc_trie_lookup(s->settings, "html_ext"), "/index.html");
assert_string_equal(bc_trie_lookup(s->settings, "content_dir"), "guda");
@@ -228,6 +230,8 @@ test_settings_env2(void **state)
assert_string_equal(bc_trie_lookup(s->settings, "pagination_prefix"), "page");
assert_string_equal(bc_trie_lookup(s->settings, "post_prefix"), "post");
assert_string_equal(bc_trie_lookup(s->settings, "tag_prefix"), "tag");
+ assert_string_equal(bc_trie_lookup(s->settings, "html_order"), "DESC");
+ assert_string_equal(bc_trie_lookup(s->settings, "atom_order"), "DESC");
assert_non_null(s->posts);
assert_string_equal(s->posts[0], "aaaa");
assert_string_equal(s->posts[1], "bbbb");
@@ -300,7 +304,7 @@ test_settings_copy_files(void **state)
assert_string_equal(bc_trie_lookup(s->global, "SITE_TITLE"), "Fuuuuuuuuu");
assert_string_equal(bc_trie_lookup(s->global, "SITE_TAGLINE"), "My cool tagline");
assert_string_equal(bc_trie_lookup(s->global, "BASE_DOMAIN"), "http://example.com");
- assert_int_equal(bc_trie_size(s->settings), 13);
+ assert_int_equal(bc_trie_size(s->settings), 15);
assert_string_equal(bc_trie_lookup(s->settings, "source_ext"), ".txt");
assert_string_equal(bc_trie_lookup(s->settings, "html_ext"), "/index.html");
assert_string_equal(bc_trie_lookup(s->settings, "content_dir"), "guda");
@@ -315,6 +319,8 @@ test_settings_copy_files(void **state)
assert_string_equal(bc_trie_lookup(s->settings, "pagination_prefix"), "page");
assert_string_equal(bc_trie_lookup(s->settings, "post_prefix"), "post");
assert_string_equal(bc_trie_lookup(s->settings, "tag_prefix"), "tag");
+ assert_string_equal(bc_trie_lookup(s->settings, "html_order"), "DESC");
+ assert_string_equal(bc_trie_lookup(s->settings, "atom_order"), "DESC");
assert_non_null(s->posts);
assert_string_equal(s->posts[0], "aaaa");
assert_string_equal(s->posts[1], "bbbb");