3 # quick latex writer test runner
11 CHECKS
=$
((CHECKS
+ 1))
13 if test $?
-gt 0 ; then
15 FAIL_QUEUE
="$FAIL_QUEUE,$1"
20 echo "-------------------------------------"
21 if test $FAILS -eq 0 ; then
22 echo "OK: all $CHECKS tests passed"
24 echo "ERROR: $FAILS of $CHECKS failed"
25 echo "Failed tests: $FAIL_QUEUE"
29 BASE_CMD
="../../tools/rst2latex.py"
31 CMD
="../../tools/rst2latex.py"
39 for INF
in `ls test/$FM` ; do
42 $CMD $2 $3 $INF > $OUTF
46 if [ -n "$1" -a ! "$1" == "-" ] ; then
52 for GO
in "" auto pdftex dvips
,300dpi
; do
53 OUTF
="$INF-graphicx-option-$GO.tex"
55 $CMD --graphicx-option=$GO $2 $3 $INF > $OUTF
60 CMD
="../../tools/rst2latex.py"
61 for FONTENC
in "" T1 OT1
; do
62 for INF
in `ls test/characters.txt` ; do
63 OUTF
="$INF-$FONTENC.tex"
65 if [ -z $FONTENC ] ; then
66 $CMD $2 $3 $INF > $OUTF
68 $CMD --font-encoding=$FONTENC $2 $3 $INF > $OUTF
75 CMD
="../../tools/rst2latex.py"
77 for TABSTYLE
in "" standard booktabs nolines
; do
78 for INF
in `ls test/tables.txt` ; do
79 OUTF
="$INF-$TABSTYLE.tex"
81 if [ -z $TABSTYLE ] ; then
82 $CMD $2 $3 $INF > $OUTF
84 $CMD --table-style=$TABSTYLE $2 $3 $INF > $OUTF
91 CMD
="../../tools/rst2latex.py"
92 INF
=test
/tables-multirow.txt
98 # with generated footer
99 CMD
="../../tools/rst2latex.py -gs"
106 CMD
="../../tools/rst2latex.py --documentclass=book"
113 #CMD="../../tools/rst2latex.py --dump-settings"
114 CMD
="../../tools/rst2latex.py --no-doc-info"
116 OUTF
="$INF-no-info.tex"
121 CMD
="../../tools/rst2latex.py --no-doc-title"
123 OUTF
="$INF-no-title.tex"
128 CMD
="../../tools/rst2latex.py --no-doc-title --no-doc-info"
130 OUTF
="$INF-no-title-info.tex"
135 CMD
="$BASE_CMD --use-latex-docinfo"
136 for F
in docinfo docinfo-2
; do
138 OUTF
="$INF-use-latex-docinfo.tex"
144 CMD
="../../tools/rst2latex.py"
148 OUTF
="$INF-use-latex-toc.tex"
150 $CMD --use-latex-toc $INF > $OUTF
159 $CMD -l de
$INF > $OUTF
168 $CMD -l fr
$INF > $OUTF
172 # use latex footnotes
173 CMD
="../../tools/rst2latex.py --use-latex-footnotes"
174 INF
=test
/footnotes.txt
175 OUTF
="$INF-use-latex-footnotes.tex"
180 # use latex citations
181 CMD
="../../tools/rst2latex.py --use-latex-citations"
182 INF
=test
/footnotes.txt
183 OUTF
="$INF-use-latex-citations.tex"
187 # on a file without citations
188 INF
=test
/no-citations.txt
189 OUTF
="$INF-use-latex-citations.tex"
194 CMD
="../../tools/rst2latex.py --use-verbatim-when-possible"
196 OUTF
="$INF-use-verbatim-when-possible.tex"
202 echo "CHECK: toc with latex toc "
211 $CMD -l de
$INF > $OUTF
214 CMD
="../../tools/rst2latex.py --attribution=parens"
215 INF
=test
/attribution.txt
216 OUTF
="$INF-parens-attribution.tex"
221 INF
=test
/iso-8859-15.txt
224 $CMD --input-encoding=iso-8859-15
--output-encoding=iso-8859-15
$INF > $OUTF