diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2020-05-16 03:33:22 +0200 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2020-05-16 03:33:22 +0200 |
commit | 8e12ae57ebe87d25c2c34ec304047fec3013da85 (patch) | |
tree | fc7f974219f6d60d8e866a540da45f69e696546b /tests/blogc/check_blogc.sh.in | |
parent | f5db671822b7b6dc74166c1c9e34a900c7f0d0cb (diff) | |
download | blogc-8e12ae57ebe87d25c2c34ec304047fec3013da85.tar.gz blogc-8e12ae57ebe87d25c2c34ec304047fec3013da85.tar.bz2 blogc-8e12ae57ebe87d25c2c34ec304047fec3013da85.zip |
blogc: added listing_empty template block
Diffstat (limited to 'tests/blogc/check_blogc.sh.in')
-rwxr-xr-x | tests/blogc/check_blogc.sh.in | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/tests/blogc/check_blogc.sh.in b/tests/blogc/check_blogc.sh.in index 87b71fa..208524d 100755 --- a/tests/blogc/check_blogc.sh.in +++ b/tests/blogc/check_blogc.sh.in @@ -183,7 +183,7 @@ cat > "${TEMP}/main.tmpl" <<EOF <div class="meta">{{ DATE_FORMATTED }}</div> <a href="{{ BASE_URL }}/post/{{ FILENAME }}/"><div>{{ TITLE }}</div></a> </li> - {% endblock %} + {% endblock %}{% block listing_empty %}vazio{% endblock %} {% block listing_once %} </ul> </div> @@ -576,6 +576,45 @@ ${TESTS_ENVIRONMENT} @abs_top_builddir@/blogc \ diff -uN "${TEMP}/output14.html" "${TEMP}/expected-output5.html" + +cat > "${TEMP}/expected-output6.html" <<EOF +<!DOCTYPE html> +<html lang="en"> + <head> + <title>Chunda's website</title> + </head> + <body> + <a href="/"><div class="name">Chunda's website</div></a> + + <section class="main"> + <div class="container"> + <div class="content"> + <div class="page-heading">Blog</div> + <ul> + + vazio + + </ul> + </div> + </div> + </section> + + + </body> +</html> +EOF + +${TESTS_ENVIRONMENT} @abs_top_builddir@/blogc \ + -D BASE_DOMAIN=http://bola.com/ \ + -D BASE_URL= \ + -D SITE_TITLE="Chunda's website" \ + -D DATE_FORMAT="%b %d, %Y, %I:%M %p GMT" \ + -t "${TEMP}/main.tmpl" \ + -o "${TEMP}/output15.html" \ + -l + +diff -uN "${TEMP}/output15.html" "${TEMP}/expected-output6.html" + echo "{% block listig %}foo{% endblock %}\n" > "${TEMP}/error.tmpl" ${TESTS_ENVIRONMENT} @abs_top_builddir@/blogc \ |