From: Christian Heller Date: Sat, 19 Nov 2016 14:08:12 +0000 (+0100) Subject: Broaden test. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%7B%7B%20web_path%20%7D%7D/decks/template?a=commitdiff_plain;h=4cfe7958e5fb106a9febfc224dca0bdb8324e3dd;p=redo-blog Broaden test. --- diff --git a/test.sh b/test.sh index 00194ba..97d0fbf 100755 --- a/test.sh +++ b/test.sh @@ -8,10 +8,13 @@ cp test/test_files/bar\ baz.md test/test_dir/ cd test/test_dir redo cd ../.. -echo "== index.html diff test ==" -diff test/test_files/index.html test/test_dir/index.html -if [ "$?" = "0" ]; then - echo "== test SUCCESS ==" -else - echo "== test FAILURE ==" -fi +for file in test/test_files/*.html; do + cmp_file=`echo "$file" | sed 's/test_files/test_dir/'` + printf "== %s diff test ==\n" "$cmp_file" + diff "$file" "$cmp_file" + if [ "$?" = "0" ]; then + echo "== test SUCCESS ==" + else + echo "== test FAILURE ==" + fi +done diff --git a/test/test_files/bar baz.html b/test/test_files/bar baz.html new file mode 100644 index 0000000..442f9ac --- /dev/null +++ b/test/test_files/bar baz.html @@ -0,0 +1,12 @@ + + + +Yet another blog – foo + + +

foo

+
+

bar

+
+ + \ No newline at end of file diff --git a/test/test_files/foo.html b/test/test_files/foo.html new file mode 100644 index 0000000..aa3575d --- /dev/null +++ b/test/test_files/foo.html @@ -0,0 +1,13 @@ + + + +Yet another blog – a title with some nasty characters: &<>"' + + +

a title with some nasty characters: &<>"'

+
+

this text contains some special characters: '"><&

+

and more than one paragraph

+
+ + \ No newline at end of file diff --git a/test/test_files/test.html b/test/test_files/test.html new file mode 100644 index 0000000..787bf0e --- /dev/null +++ b/test/test_files/test.html @@ -0,0 +1,12 @@ + + + +Yet another blog – foo bar baz + + +

foo bar baz

+
+

bar

+
+ + \ No newline at end of file