aboutsummaryrefslogtreecommitdiffstats
path: root/tests/blogc-make/check_blogc_make.sh.in
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2018-06-10 02:24:07 +0200
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2018-06-10 02:24:07 +0200
commitc5e94b1db232921a4c5eb7f5aa620055e76b3414 (patch)
treec1564dea1afba01ef7c7432a23a1e0795152d6b6 /tests/blogc-make/check_blogc_make.sh.in
parentcab17026f64ba78bfd9dcac6327607af8e396ebd (diff)
downloadblogc-c5e94b1db232921a4c5eb7f5aa620055e76b3414.tar.gz
blogc-c5e94b1db232921a4c5eb7f5aa620055e76b3414.tar.bz2
blogc-c5e94b1db232921a4c5eb7f5aa620055e76b3414.zip
Revert "make: disable pagination rules if <= 0 posts per page"
This reverts commit cab17026f64ba78bfd9dcac6327607af8e396ebd. Poorly implemented :/
Diffstat (limited to 'tests/blogc-make/check_blogc_make.sh.in')
-rwxr-xr-xtests/blogc-make/check_blogc_make.sh.in48
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/blogc-make/check_blogc_make.sh.in b/tests/blogc-make/check_blogc_make.sh.in
index 20cf1f7..001241a 100755
--- a/tests/blogc-make/check_blogc_make.sh.in
+++ b/tests/blogc-make/check_blogc_make.sh.in
@@ -194,6 +194,7 @@ post11
EOF
${TESTS_ENVIRONMENT} @abs_top_builddir@/blogc-make -f "${TEMP}/proj/blogcfile" 2>&1 | tee "${TEMP}/output.txt"
+grep "_build/index\\.html" "${TEMP}/output.txt"
grep "_build/atom\\.xml" "${TEMP}/output.txt"
grep "_build/post/post01/index\\.html" "${TEMP}/output.txt"
grep "_build/post/post02/index\\.html" "${TEMP}/output.txt"
@@ -209,6 +210,34 @@ grep "_build/post/post11/index\\.html" "${TEMP}/output.txt"
rm "${TEMP}/output.txt"
+cat > "${TEMP}/expected-index.html" <<EOF
+
+Listing: Post 11 - Sep 11, 2016, 12:00 AM GMT
+
+Listing: Post 10 - Sep 10, 2016, 12:00 AM GMT
+
+Listing: Post 09 - Sep 09, 2016, 12:00 AM GMT
+
+Listing: Post 08 - Sep 08, 2016, 12:00 AM GMT
+
+Listing: Post 07 - Sep 07, 2016, 12:00 AM GMT
+
+Listing: Post 06 - Sep 06, 2016, 12:00 AM GMT
+
+Listing: Post 05 - Sep 05, 2016, 12:00 AM GMT
+
+Listing: Post 04 - Sep 04, 2016, 12:00 AM GMT
+
+Listing: Post 03 - Sep 03, 2016, 12:00 AM GMT
+
+Listing: Post 02 - Sep 02, 2016, 12:00 AM GMT
+
+Listing: Post 01 - Sep 01, 2016, 12:00 AM GMT
+
+
+EOF
+diff -uN "${TEMP}/proj/_build/index.html" "${TEMP}/expected-index.html"
+
cat > "${TEMP}/expected-atom.xml" <<EOF
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
@@ -421,6 +450,7 @@ EOF
${TESTS_ENVIRONMENT} @abs_top_builddir@/blogc-make -f "${TEMP}/proj/blogcfile" 2>&1 | tee "${TEMP}/output.txt"
grep "_build/index\\.html" "${TEMP}/output.txt"
+grep "_build/atom\\.xml" "${TEMP}/output.txt"
grep "_build/post/post01/index\\.html" "${TEMP}/output.txt"
grep "_build/post/post02/index\\.html" "${TEMP}/output.txt"
grep "_build/post/post03/index\\.html" "${TEMP}/output.txt"
@@ -461,6 +491,24 @@ Listing: Post 02 - Sep 02, 2016, 12:00 AM GMT
EOF
diff -uN "${TEMP}/proj/_build/index.html" "${TEMP}/expected-index.html"
+cat > "${TEMP}/expected-atom.xml" <<EOF
+<?xml version="1.0" encoding="utf-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom">
+ <title type="text">Lol's Website</title>
+ <id>/atom.xml</id>
+ <updated></updated>
+ <link href="http://example.org/" />
+ <link href="http://example.org/atom.xml" rel="self" />
+ <author>
+ <name>Lol</name>
+ <email>author@example.com</email>
+ </author>
+ <subtitle type="text">WAT?!</subtitle>
+
+</feed>
+EOF
+diff -uN "${TEMP}/proj/_build/atom.xml" "${TEMP}/expected-atom.xml"
+
cat > "${TEMP}/expected-post-post01.html" <<EOF