diff --git a/test/html5/testhtml5.sh b/test/html5/testhtml5.sh new file mode 100644 index 0000000..beb3e7f --- /dev/null +++ b/test/html5/testhtml5.sh @@ -0,0 +1,97 @@ +set -eu + +noexe() +{ + echo "Unable to find/run exe ${TMPEXE}! *** FIX ME ***" + echo "Set the name of the 'tidy' executable to use..." + exit 1 +} + +noout() +{ + echo "Unable to creat ${TMPDIR}" + exit 1 +} + +failed() +{ + echo "The test of ${f} FAILED!"; + TMPCNT3=$((${TMPCNT3} + 1)); +} + +TMPEXE="../../build/cmake/tidy5" +[ -e ${TMPEXE} ] || noexe + +TMPINP=temphtml5.cfg +TMPDIR=tempout + +${TMPEXE} -h > /dev/null || noexe + +if [ ! -e "${TMPDIR}" ]; then + echo "Will create the folder ${TMPDIR} for output" + read + + mkdir ${TMPDIR} || noout +fi + +# This option would be nice, but at present it is FARRRR TOOOOO agressive, +# dropping ,
, etc... because they are marked CM_OPT +# which causes WARNINGS when tidy is run on the tidied file!!! +# echo omit-optional-tags: yes >> ${TMPINP} + +if [ ! -e "${TMPINP}" ]; then + echo "Creating a CONFIG file ${TMPINP}" + read + + cat <