aboutsummaryrefslogtreecommitdiffstats
path: root/tests/blogc-make/check_settings.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2017-04-28 00:26:32 +0200
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2017-04-28 00:29:21 +0200
commitf3b6c03f21e45edd2220cb6fc996fe4b5fa11bb8 (patch)
tree4561ae8996aa56ef9377974c1faec93a0f344e3c /tests/blogc-make/check_settings.c
parent434afc5ac1ccf97394c38eaa3b4f5de176fbdce0 (diff)
downloadblogc-f3b6c03f21e45edd2220cb6fc996fe4b5fa11bb8.tar.gz
blogc-f3b6c03f21e45edd2220cb6fc996fe4b5fa11bb8.tar.bz2
blogc-f3b6c03f21e45edd2220cb6fc996fe4b5fa11bb8.zip
make: settings: do not read output_dir from blogcfile
now it is only possible to override output directory using environment variable. this commit also reduces the number trie lookups.
Diffstat (limited to 'tests/blogc-make/check_settings.c')
-rw-r--r--tests/blogc-make/check_settings.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/tests/blogc-make/check_settings.c b/tests/blogc-make/check_settings.c
index fab1dd6..4016e15 100644
--- a/tests/blogc-make/check_settings.c
+++ b/tests/blogc-make/check_settings.c
@@ -39,7 +39,6 @@ test_settings(void **state)
{
const char *a =
"[settings]\n"
- "output_dir = bola\n"
"content_dir = guda\n"
"main_template = foo.tmpl\n"
"\n"
@@ -62,7 +61,6 @@ test_settings_env(void **state)
{
const char *a =
"[settings]\n"
- "output_dir = bola\n"
"content_dir = guda\n"
"main_template = foo.tmpl\n"
"\n"
@@ -85,7 +83,6 @@ test_settings2(void **state)
{
const char *a =
"[settings]\n"
- "output_dir = bola\n"
"content_dir = guda\n"
"main_template = foo.tmpl\n"
"\n"
@@ -129,10 +126,9 @@ 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), 14);
+ assert_int_equal(bc_trie_size(s->settings), 13);
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, "output_dir"), "bola");
assert_string_equal(bc_trie_lookup(s->settings, "content_dir"), "guda");
assert_string_equal(bc_trie_lookup(s->settings, "template_dir"), "templates");
assert_string_equal(bc_trie_lookup(s->settings, "main_template"), "foo.tmpl");
@@ -174,7 +170,6 @@ test_settings_env2(void **state)
{
const char *a =
"[settings]\n"
- "output_dir = bola\n"
"content_dir = guda\n"
"main_template = foo.tmpl\n"
"\n"
@@ -218,10 +213,9 @@ 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), 14);
+ assert_int_equal(bc_trie_size(s->settings), 13);
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, "output_dir"), "bola");
assert_string_equal(bc_trie_lookup(s->settings, "content_dir"), "guda");
assert_string_equal(bc_trie_lookup(s->settings, "template_dir"), "templates");
assert_string_equal(bc_trie_lookup(s->settings, "main_template"), "foo.tmpl");
@@ -263,7 +257,6 @@ test_settings_copy_files(void **state)
{
const char *a =
"[settings]\n"
- "output_dir = bola\n"
"content_dir = guda\n"
"main_template = foo.tmpl\n"
"\n"
@@ -307,10 +300,9 @@ 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), 14);
+ assert_int_equal(bc_trie_size(s->settings), 13);
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, "output_dir"), "bola");
assert_string_equal(bc_trie_lookup(s->settings, "content_dir"), "guda");
assert_string_equal(bc_trie_lookup(s->settings, "template_dir"), "templates");
assert_string_equal(bc_trie_lookup(s->settings, "main_template"), "foo.tmpl");