From 60f8be44dd876c221270a34989480936e716f5ab Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Sun, 21 Apr 2019 19:12:01 +0200 Subject: make: removed atom_legacy_entry_id setting --- tests/blogc-make/check_atom.c | 98 +++++++------------------------------------ 1 file changed, 14 insertions(+), 84 deletions(-) (limited to 'tests') diff --git a/tests/blogc-make/check_atom.c b/tests/blogc-make/check_atom.c index a8fe4af..94c9a37 100644 --- a/tests/blogc-make/check_atom.c +++ b/tests/blogc-make/check_atom.c @@ -491,50 +491,15 @@ test_atom_legacy_entry_id_empty(void **state) bc_error_t *err = NULL; char *rv = bm_atom_deploy(settings, &err); - assert_non_null(rv); - assert_null(err); + assert_null(rv); + assert_non_null(err); - size_t cmp_len; - char *cmp = bc_file_get_contents(rv, true, &cmp_len, &err); + assert_int_equal(err->type, BLOGC_MAKE_ERROR_ATOM); + assert_string_equal(err->msg, + "'atom_legacy_entry_id' setting is not supported anymore. see " + "https://blogc.rgm.io/news/blogc-0.16.1/ for details"); - assert_non_null(cmp); - assert_null(err); - - assert_string_equal(cmp, - "\n" - "\n" - " {{ SITE_TITLE }}{% ifdef FILTER_TAG %} - " - "{{ FILTER_TAG }}{% endif %}\n" - " {{ BASE_DOMAIN }}{{ BASE_URL }}{% ifdef FILTER_TAG %}/{{ FILTER_TAG }}" - "{% else %}/index{% endif %}.xml\n" - " {{ DATE_FIRST_FORMATTED }}\n" - " \n" - " \n" - " \n" - " {{ AUTHOR_NAME }}\n" - " {{ AUTHOR_EMAIL }}\n" - " \n" - " {{ SITE_TAGLINE }}\n" - " {% block listing %}\n" - " \n" - " {{ TITLE }}\n" - " {{ BASE_DOMAIN }}{{ BASE_URL }}/{{ FILENAME }}/\n" - " {{ DATE_FORMATTED }}\n" - " {{ DATE_FORMATTED }}\n" - " \n" - " \n" - " {{ AUTHOR_NAME }}\n" - " {{ AUTHOR_EMAIL }}\n" - " \n" - " \n" - " \n" - " {% endblock %}\n" - "\n"); - - free(cmp); - bm_atom_destroy(rv); - free(rv); + bc_error_free(err); bc_trie_free(settings->settings); free(settings); } @@ -554,50 +519,15 @@ test_atom_legacy_entry_id(void **state) bc_error_t *err = NULL; char *rv = bm_atom_deploy(settings, &err); - assert_non_null(rv); - assert_null(err); + assert_null(rv); + assert_non_null(err); - size_t cmp_len; - char *cmp = bc_file_get_contents(rv, true, &cmp_len, &err); + assert_int_equal(err->type, BLOGC_MAKE_ERROR_ATOM); + assert_string_equal(err->msg, + "'atom_legacy_entry_id' setting is not supported anymore. see " + "https://blogc.rgm.io/news/blogc-0.16.1/ for details"); - assert_non_null(cmp); - assert_null(err); - - assert_string_equal(cmp, - "\n" - "\n" - " {{ SITE_TITLE }}{% ifdef FILTER_TAG %} - " - "{{ FILTER_TAG }}{% endif %}\n" - " {{ BASE_DOMAIN }}{{ BASE_URL }}/atom{% ifdef FILTER_TAG %}/{{ FILTER_TAG }}" - "{% endif %}.xml\n" - " {{ DATE_FIRST_FORMATTED }}\n" - " \n" - " \n" - " \n" - " {{ AUTHOR_NAME }}\n" - " {{ AUTHOR_EMAIL }}\n" - " \n" - " {{ SITE_TAGLINE }}\n" - " {% block listing %}\n" - " \n" - " {{ TITLE }}\n" - " {{ BASE_DOMAIN }}{{ BASE_URL }}/post/{{ FILENAME }}/\n" - " {{ DATE_FORMATTED }}\n" - " {{ DATE_FORMATTED }}\n" - " \n" - " \n" - " {{ AUTHOR_NAME }}\n" - " {{ AUTHOR_EMAIL }}\n" - " \n" - " \n" - " \n" - " {% endblock %}\n" - "\n"); - - free(cmp); - bm_atom_destroy(rv); - free(rv); + bc_error_free(err); bc_trie_free(settings->settings); free(settings); } -- cgit v1.2.3-18-g5258