diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/biblatex-abnt/test.sh')
-rwxr-xr-x | Master/texmf-dist/doc/latex/biblatex-abnt/test.sh | 76 |
1 files changed, 51 insertions, 25 deletions
diff --git a/Master/texmf-dist/doc/latex/biblatex-abnt/test.sh b/Master/texmf-dist/doc/latex/biblatex-abnt/test.sh index afaa99c1ab3..6994b6fc15b 100755 --- a/Master/texmf-dist/doc/latex/biblatex-abnt/test.sh +++ b/Master/texmf-dist/doc/latex/biblatex-abnt/test.sh @@ -1,28 +1,54 @@ #!/bin/bash -sed -i '' 's/\\toggletrue{reference}/% \\toggletrue{reference}/' NBR10520-2002.tex - -sed -i '' 's/\\toggletrue{reference}/% \\toggletrue{reference}/' NBR6023-2002.tex - -latexmk -pdf -norc NBR10520-2002.tex - -latexmk -pdf -norc NBR6023-2002.tex - -pdflatex NBR10520-2002_test.tex - -pdflatex NBR6023-2002_test.tex - -latexmk -norc -c - -rm NBR10520-2002.bbl - -rm NBR6023-2002.bbl - -rm NBR10520-2002.run.xml - -rm NBR6023-2002.run.xml - -sed -i '' 's/% \\toggletrue{reference}/\\toggletrue{reference}/' NBR10520-2002.tex - -sed -i '' 's/% \\toggletrue{reference}/\\toggletrue{reference}/' NBR6023-2002.tex +set -e + +echo "Running tests..." + +pass=true + + +sed -i.bak 's/\\toggletrue{reference}/% \\toggletrue{reference}/' NBR10520-2002.tex +pdflatex -draftmode -interaction=batchmode NBR10520-2002.tex +biber NBR10520-2002 +pdflatex -draftmode -interaction=batchmode NBR10520-2002.tex +pdflatex -interaction=batchmode NBR10520-2002.tex +pdflatex -interaction=batchmode NBR10520-2002_test.tex +sed -i.bak 's/% \\toggletrue{reference}/\\toggletrue{reference}/' NBR10520-2002.tex + +while read -r line ; do + C=$(echo $line | awk '{print $1}') + Y=$(echo $line | awk '{print $2}') + M=$(echo $line | awk '{print $3}') + if [ "$C" != 0.00000 ] || [ "$Y" != 0.00000 ] || [ "$M" != 0.00000 ] ; then + pass=false + fi +done < <(gs -q -o - -sDEVICE=inkcov NBR10520-2002_test.pdf | sed -e '1d') + + +sed -i.bak 's/\\toggletrue{reference}/% \\toggletrue{reference}/' NBR6023-2002.tex +pdflatex -draftmode -interaction=batchmode NBR6023-2002.tex +biber NBR6023-2002 +pdflatex -draftmode -interaction=batchmode NBR6023-2002.tex +pdflatex -draftmode -interaction=batchmode NBR6023-2002.tex +pdflatex -interaction=batchmode NBR6023-2002.tex +pdflatex -interaction=batchmode NBR6023-2002_test.tex +sed -i.bak 's/% \\toggletrue{reference}/\\toggletrue{reference}/' NBR6023-2002.tex + +while read -r line ; do + C=$(echo $line | awk '{print $1}') + Y=$(echo $line | awk '{print $2}') + M=$(echo $line | awk '{print $3}') + if [ "$C" != 0.00000 ] || [ "$Y" != 0.00000 ] || [ "$M" != 0.00000 ] ; then + pass=false + fi +done < <(gs -q -o - -sDEVICE=inkcov NBR6023-2002_test.pdf | sed -e '1d') + + +if [ "$pass" = true ] ; then + echo "ALL GOOD!" + exit 0 +else + echo "OOPS, THERE'S SOMETHING WRONG!" + exit 1 +fi |