diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2018-07-24 02:27:48 +0200 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2018-07-24 02:27:51 +0200 |
commit | c16c86bcc01dff2a984aeffd58e2402a876cc12d (patch) | |
tree | 7f2b3a6ea5951f7f684d550549069e0f1f0452f0 /tests/blogc-make/check_settings.c | |
parent | 355c8d37d0ce570e45fe8b905fee6417be35942e (diff) | |
download | blogc-c16c86bcc01dff2a984aeffd58e2402a876cc12d.tar.gz blogc-c16c86bcc01dff2a984aeffd58e2402a876cc12d.tar.bz2 blogc-c16c86bcc01dff2a984aeffd58e2402a876cc12d.zip |
make: handle empty prefixes properly
still needs to add integration tests
Diffstat (limited to 'tests/blogc-make/check_settings.c')
-rw-r--r-- | tests/blogc-make/check_settings.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/blogc-make/check_settings.c b/tests/blogc-make/check_settings.c index 6eaaaec..8acf7e6 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), 15); + assert_int_equal(bc_trie_size(s->settings), 16); 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"); @@ -143,6 +143,7 @@ test_settings2(void **state) 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_string_equal(bc_trie_lookup(s->settings, "index_prefix"), ""); assert_non_null(s->posts); assert_string_equal(s->posts[0], "aaaa"); assert_string_equal(s->posts[1], "bbbb"); @@ -215,7 +216,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), 15); + assert_int_equal(bc_trie_size(s->settings), 16); 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"); @@ -232,6 +233,7 @@ test_settings_env2(void **state) 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_string_equal(bc_trie_lookup(s->settings, "index_prefix"), ""); assert_non_null(s->posts); assert_string_equal(s->posts[0], "aaaa"); assert_string_equal(s->posts[1], "bbbb"); @@ -304,7 +306,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), 15); + assert_int_equal(bc_trie_size(s->settings), 16); 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"); @@ -321,6 +323,7 @@ test_settings_copy_files(void **state) 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_string_equal(bc_trie_lookup(s->settings, "index_prefix"), ""); assert_non_null(s->posts); assert_string_equal(s->posts[0], "aaaa"); assert_string_equal(s->posts[1], "bbbb"); |