diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2017-03-11 15:58:30 +0100 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2017-03-11 15:58:30 +0100 |
commit | 2b485906cfa6d2e0431b0fa0120e1c267074b4e8 (patch) | |
tree | 152720e5925a6f772fc8275c32bd3976f8943a25 /tests/blogc-make | |
parent | acf14b6fafd39e46ba343fd069bed205d7c35fb9 (diff) | |
download | blogc-2b485906cfa6d2e0431b0fa0120e1c267074b4e8.tar.gz blogc-2b485906cfa6d2e0431b0fa0120e1c267074b4e8.tar.bz2 blogc-2b485906cfa6d2e0431b0fa0120e1c267074b4e8.zip |
make: all builds are "production" by default, enable "dev" on cli.
this is more consistent with other similar tools, and enables us to add
something like a [copy:dev] section later, that will avoid copying dev
files to production builds.
Diffstat (limited to 'tests/blogc-make')
-rw-r--r-- | tests/blogc-make/check_exec.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/blogc-make/check_exec.c b/tests/blogc-make/check_exec.c index 081aa25..1dac6b2 100644 --- a/tests/blogc-make/check_exec.c +++ b/tests/blogc-make/check_exec.c @@ -107,7 +107,7 @@ test_build_blogc_cmd_with_settings(void **state) static void -test_build_blogc_cmd_with_settings_and_production(void **state) +test_build_blogc_cmd_with_settings_and_dev(void **state) { bm_settings_t *settings = bc_malloc(sizeof(bm_settings_t)); settings->settings = bc_trie_new(free); @@ -122,22 +122,21 @@ test_build_blogc_cmd_with_settings_and_production(void **state) "main.tmpl", "foo.html", true, true); assert_string_equal(rv, "LC_ALL='en_US.utf8' blogc -D FOO='BAR' -D BAR='BAZ' -D LOL='HEHE' " - "-D MAKE_ENV_PRODUCTION=1 -D MAKE_ENV='production' -l -t 'main.tmpl' " - "-o 'foo.html' -i"); + "-D MAKE_ENV_DEV=1 -D MAKE_ENV='dev' -l -t 'main.tmpl' -o 'foo.html' -i"); free(rv); rv = bm_exec_build_blogc_cmd("blogc", settings, variables, false, NULL, NULL, true, false); assert_string_equal(rv, "LC_ALL='en_US.utf8' blogc -D FOO='BAR' -D BAR='BAZ' -D LOL='HEHE' " - "-D MAKE_ENV_PRODUCTION=1 -D MAKE_ENV='production'"); + "-D MAKE_ENV_DEV=1 -D MAKE_ENV='dev'"); free(rv); rv = bm_exec_build_blogc_cmd("blogc", settings, NULL, false, NULL, NULL, true, false); assert_string_equal(rv, "LC_ALL='en_US.utf8' blogc -D FOO='BAR' -D BAR='BAZ' " - "-D MAKE_ENV_PRODUCTION=1 -D MAKE_ENV='production'"); + "-D MAKE_ENV_DEV=1 -D MAKE_ENV='dev'"); free(rv); bc_trie_free(variables); @@ -181,7 +180,7 @@ main(void) const UnitTest tests[] = { unit_test(test_find_binary), unit_test(test_build_blogc_cmd_with_settings), - unit_test(test_build_blogc_cmd_with_settings_and_production), + unit_test(test_build_blogc_cmd_with_settings_and_dev), unit_test(test_build_blogc_cmd_without_settings), }; return run_tests(tests); |