X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/git-favicon.png?a=blobdiff_plain;f=test.sh;h=c64c2e935f5281bb134b518f7d0df9f743841756;hb=d962915f35c07c652aaf127e7ccb0aad1725e871;hp=00194ba7f644bebf3e245292be75b20e11ba5e70;hpb=58272f437f554daa14ac1dfdf9902d48c17841bf;p=redo-blog diff --git a/test.sh b/test.sh index 00194ba..c64c2e9 100755 --- a/test.sh +++ b/test.sh @@ -8,9 +8,19 @@ 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 +for file in test/test_files/*.html test/test_files/*.meta; 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 +uuid_file=test/test_dir/uuid.meta +printf "== %s UUID pattern match test ==\n" "$uuid_file" +if cat "$uuid_file" | grep -Eq "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"; then echo "== test SUCCESS ==" else echo "== test FAILURE =="