From 59e1df233e351a91240c02ac55e8d97bda2f0e43 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Thu, 3 Aug 2017 02:44:36 +0200 Subject: make: added 'html_order' and 'atom_order' settings these settings are used to change the order of the posts on the listings. by default, users are supposed to list their posts from older to newer in the blogcfile, and blogc-make will list them on descending order, both for html listings and atom listings. --- tests/blogc-make/check_blogc_make.sh.in | 116 +++++++++++++++++++++++++++++++- 1 file changed, 114 insertions(+), 2 deletions(-) (limited to 'tests/blogc-make/check_blogc_make.sh.in') diff --git a/tests/blogc-make/check_blogc_make.sh.in b/tests/blogc-make/check_blogc_make.sh.in index beb1f6c..d27c3c0 100755 --- a/tests/blogc-make/check_blogc_make.sh.in +++ b/tests/blogc-make/check_blogc_make.sh.in @@ -77,6 +77,116 @@ rm "${TEMP}/output.txt" cat > "${TEMP}/expected-index.html" < "${TEMP}/expected-atom.xml" < + + Lol's Website + /atom.xml + 2016-09-01T00:00:00Z + + + + Lol + author@example.com + + WAT?! + + + Bar + /post/bar/ + 2016-09-01T00:00:00Z + 2016-09-01T00:00:00Z + + + Lol + author@example.com + + This is bar.

+]]>
+
+ + + Foo + /post/foo/ + 2016-10-01T00:00:00Z + 2016-10-01T00:00:00Z + + + Lol + author@example.com + + This is foo.

+]]>
+
+ +
+EOF +diff -uN "${TEMP}/proj/_build/atom.xml" "${TEMP}/expected-atom.xml" + +cat > "${TEMP}/expected-post-foo.html" <This is foo.

+ + +EOF +diff -uN "${TEMP}/proj/_build/post/foo/index.html" "${TEMP}/expected-post-foo.html" + +cat > "${TEMP}/expected-post-bar.html" <This is bar.

+ + +EOF +diff -uN "${TEMP}/proj/_build/post/bar/index.html" "${TEMP}/expected-post-bar.html" + +rm -rf "${TEMP}/proj/_build" + + +### default settings with some posts, order asc + +cat > "${TEMP}/proj/blogcfile" <&1 | tee "${TEMP}/output.txt" +grep "_build/index\\.html" "${TEMP}/output.txt" +grep "_build/atom\\.xml" "${TEMP}/output.txt" +grep "_build/page/1/index\\.html" "${TEMP}/output.txt" +grep "_build/post/foo/index\\.html" "${TEMP}/output.txt" +grep "_build/post/bar/index\\.html" "${TEMP}/output.txt" + +rm "${TEMP}/output.txt" + +cat > "${TEMP}/expected-index.html" < "${TEMP}/proj/content/post/baz.txt" < "${TEMP}/proj/content/page1.txt" <