[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: tp/tests/run_parser_all.sh (check_info_math2img,
From: |
Patrice Dumas |
Subject: |
branch master updated: tp/tests/run_parser_all.sh (check_info_math2img, no_dvipng) (post_process_output): add support for INFO_MATH_IMAGES tests. |
Date: |
Tue, 24 Dec 2024 07:58:02 -0500 |
This is an automated email from the git hooks/post-receive script.
pertusus pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 9c0f396c7e tp/tests/run_parser_all.sh (check_info_math2img, no_dvipng)
(post_process_output): add support for INFO_MATH_IMAGES tests.
9c0f396c7e is described below
commit 9c0f396c7e58fed2387f45f1732fc9409ff6742f
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Oct 31 02:29:30 2024 +0100
tp/tests/run_parser_all.sh (check_info_math2img, no_dvipng)
(post_process_output): add support for INFO_MATH_IMAGES tests.
* autogen.sh, tp/tests/Makefile.am (other_tests_dirs), configure.ac
(AC_CONFIG_FILES), tp/tests/Makefile.onetst,
tp/tests/info_tex/Makefile.am, tp/tests/info_tex/tex_math.texi: add
test of INFO_MATH_IMAGES.
---
ChangeLog | 10 +++
autogen.sh | 2 +-
configure.ac | 1 +
tp/tests/Makefile.am | 2 +-
tp/tests/Makefile.onetst | 5 +-
tp/tests/info_tex/Makefile.am | 8 ++
tp/tests/info_tex/list-of-tests | 2 +
.../tex_math_info_math_images/tex_math.2 | 0
.../tex_math_info_math_images/tex_math.info | Bin 0 -> 2052 bytes
.../tex_math_info_math2img.tex | 56 ++++++++++++++
tp/tests/info_tex/tex_math.texi | 86 +++++++++++++++++++++
tp/tests/run_parser_all.sh | 31 +++++++-
.../info_tex_tex_math_info_math_images.sh | 25 ++++++
13 files changed, 223 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a2e11f27c3..61fc684c5f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-10-31 Patrice Dumas <pertusus@free.fr>
+
+ tp/tests/run_parser_all.sh (check_info_math2img, no_dvipng)
+ (post_process_output): add support for INFO_MATH_IMAGES tests.
+
+ * autogen.sh, tp/tests/Makefile.am (other_tests_dirs), configure.ac
+ (AC_CONFIG_FILES), tp/tests/Makefile.onetst,
+ tp/tests/info_tex/Makefile.am, tp/tests/info_tex/tex_math.texi: add
+ test of INFO_MATH_IMAGES.
+
2024-10-31 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Convert/LaTeX.pm (convert_math_to_images): return png
diff --git a/autogen.sh b/autogen.sh
index 49766b0301..696be2e59e 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -21,7 +21,7 @@ echo " $cmd"
$chicken eval $cmd || exit 1
# Generates tp/tests/Makefile.onetst (included by tp/tests/Makefile.am).
-cmd="(cd tp/tests && ../maintain/regenerate_cmd_tests.sh Makefile.onetst .
-base 'formatting encoded nested_formats customization coverage layout'
-tex_html 'tex_html' -other 'other')"
+cmd="(cd tp/tests && ../maintain/regenerate_cmd_tests.sh Makefile.onetst .
-base 'formatting encoded nested_formats customization coverage layout'
-tex_html 'tex_html' -other 'other info_tex')"
echo " $cmd"
$chicken eval $cmd || exit 1
diff --git a/configure.ac b/configure.ac
index 378d213902..e1ceb8d843 100644
--- a/configure.ac
+++ b/configure.ac
@@ -666,6 +666,7 @@ AC_CONFIG_FILES([\
tp/tests/layout/Makefile
tp/tests/tex_html/Makefile
tp/tests/other/Makefile
+ tp/tests/info_tex/Makefile
tp/defs
js/Makefile
Pod-Simple-Texinfo/Makefile
diff --git a/tp/tests/Makefile.am b/tp/tests/Makefile.am
index ae5cca2713..16c432557f 100644
--- a/tp/tests/Makefile.am
+++ b/tp/tests/Makefile.am
@@ -24,7 +24,7 @@ $(srcdir)/Makefile.onetst: \
base_tests_dirs = formatting encoded nested_formats customization coverage
layout
tex_html_tests_dirs = tex_html
-other_tests_dirs = other
+other_tests_dirs = other info_tex
DIST_SUBDIRS = many_input_files $(base_tests_dirs) $(tex_html_tests_dirs)
$(other_tests_dirs)
SUBDIRS = . many_input_files
diff --git a/tp/tests/Makefile.onetst b/tp/tests/Makefile.onetst
index 4841a4a973..c3c4877d84 100644
--- a/tp/tests/Makefile.onetst
+++ b/tp/tests/Makefile.onetst
@@ -11,7 +11,7 @@
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# List of files that describe tests. See tp/tests/README.
-test_driving_files_generated_list = formatting/list-of-tests
encoded/list-of-tests nested_formats/list-of-tests customization/list-of-tests
coverage/list-of-tests layout/list-of-tests tex_html/list-of-tests
other/list-of-tests
+test_driving_files_generated_list = formatting/list-of-tests
encoded/list-of-tests nested_formats/list-of-tests customization/list-of-tests
coverage/list-of-tests layout/list-of-tests tex_html/list-of-tests
other/list-of-tests info_tex/list-of-tests
# List of test scripts that only run one test
one_test_files_generated_list = $(type_base_one_test_files_generated_list)
$(type_tex_html_one_test_files_generated_list)
$(type_other_one_test_files_generated_list)
@@ -150,5 +150,6 @@ type_other_one_test_files_generated_list = \
test_scripts/other_index_collation_test_collation_locale_en.sh \
test_scripts/other_index_collation_test_collation_locale_en_US.sh \
test_scripts/other_index_collation_test_collation_locale_sv.sh \
- test_scripts/other_index_collation_test_documentlanguage_collation.sh
+ test_scripts/other_index_collation_test_documentlanguage_collation.sh \
+ test_scripts/info_tex_tex_math_info_math_images.sh
diff --git a/tp/tests/info_tex/Makefile.am b/tp/tests/info_tex/Makefile.am
new file mode 100644
index 0000000000..2b9b100b88
--- /dev/null
+++ b/tp/tests/info_tex/Makefile.am
@@ -0,0 +1,8 @@
+EXTRA_DIST = \
+ tex_math.texi \
+ list-of-tests res_parser
+
+DISTCLEANFILES = tests.log tests.out
+
+distclean-local:
+ rm -rf out_parser raw_out_parser diffs test_log
diff --git a/tp/tests/info_tex/list-of-tests b/tp/tests/info_tex/list-of-tests
new file mode 100644
index 0000000000..204e522be7
--- /dev/null
+++ b/tp/tests/info_tex/list-of-tests
@@ -0,0 +1,2 @@
+
+tex_math_info_math_images tex_math --info -c INFO_MATH_IMAGES=1
diff --git a/tp/tests/info_tex/res_parser/tex_math_info_math_images/tex_math.2
b/tp/tests/info_tex/res_parser/tex_math_info_math_images/tex_math.2
new file mode 100644
index 0000000000..e69de29bb2
diff --git
a/tp/tests/info_tex/res_parser/tex_math_info_math_images/tex_math.info
b/tp/tests/info_tex/res_parser/tex_math_info_math_images/tex_math.info
new file mode 100644
index 0000000000..5f5844707d
Binary files /dev/null and
b/tp/tests/info_tex/res_parser/tex_math_info_math_images/tex_math.info differ
diff --git
a/tp/tests/info_tex/res_parser/tex_math_info_math_images/tex_math_info_math2img.tex
b/tp/tests/info_tex/res_parser/tex_math_info_math_images/tex_math_info_math2img.tex
new file mode 100644
index 0000000000..4f3e6a937f
--- /dev/null
+++
b/tp/tests/info_tex/res_parser/tex_math_info_math_images/tex_math_info_math2img.tex
@@ -0,0 +1,56 @@
+% Automatically generated by Texinfo math to image code
+
+\documentclass{minimal}
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage{amsmath}
+\usepackage{amsthm}
+\usepackage{amssymb}
+\usepackage{bm}
+\usepackage[active,tightpage]{preview}
+\pagestyle{empty}
+\begin{document}
+\begin{preview}
+${x^i}\over{\tan y}$
+\end{preview}
+
+\begin{preview}
+${{x^i}\over{\tan y}} + \frac{x^i}{\tan y} + \frac{x^j}{\tan y} -
\frac{x^j}{\tan z}
+ \times \frac{x^i}{\tan y}$
+\end{preview}
+
+\begin{preview}
+$a \backslash{} b $
+\end{preview}
+
+\begin{preview}
+$\mathtt{math code} a < b$
+\end{preview}
+
+\begin{preview}
+$\underline{\mathtt{math \hbox{ code }}} \sum_{i}{\underline{\mathit{eff}}}$
+\end{preview}
+
+\begin{preview}
+$\sum_{i} f(x)^{2}$
+\end{preview}
+
+\begin{preview}
+$\hat{a}ééççàààà$
+\end{preview}
+
+\begin{preview}
+
+\[-- f(x) = {1 \over \sigma \sqrt{2\pi}}e^{-{1 \over 2}\left({x-\mu \over
\sigma}\right)^2}
+\]
+\end{preview}
+
+\begin{preview}
+
+\[ f(x)
+= {1\over\sigma\sqrt{2\pi}}
+ e^{-{1\over2}\left({x-\mu\over\sigma}\right)^2}
+\]
+\end{preview}
+
+\end{document}
diff --git a/tp/tests/info_tex/tex_math.texi b/tp/tests/info_tex/tex_math.texi
new file mode 100644
index 0000000000..ddcbf7ac33
--- /dev/null
+++ b/tp/tests/info_tex/tex_math.texi
@@ -0,0 +1,86 @@
+\input texinfo @c -*-texinfo-*-
+
+@node Top
+@top Tests
+
+@node Chap
+@chapter chap
+
+@c can be used to compare direct rendering of an image
+@c @image{my_image}
+
+@ifhtml
+@tex
+
+$$ \chi^2 = \sum_{i=1}^N
+ \left(y_i - (a + b x_i)
+ \over \sigma_i\right)^2 $$
+
+
+@end tex
+Following end tex
+@end ifhtml
+
+LaTeX block
+@latex
+\begin{eqnarray}
+\frac{@var{a}^b}{\xi} &=& @code{@'e} \\
+X &=& Y
+\end{eqnarray}
+@end latex
+
+Test of @@math
+Here some @math{{x^i}\over{\tan y}}.
+
+Some very long math @math{{{x^i}\over{\tan y}} + \frac{x^i}{\tan y} +
\frac{x^j}{\tan y} - \frac{x^j}{\tan z}
+ \times \frac{x^i}{\tan y}}.
+
+Maths with protected \ and space at end of math:
+@math{a @\ b }.
+
+Maths with code @@-command:
+
+@math{@code{math code} a < b} after
+@cindex fentry
+
+Maths with code @@-command and braces:
+
+@math{ \underline{@code{math \hbox{ code }}} \sum_{i}{\underline{@var{eff}}}}
+
+Maths with @@-sup
+
+@math{\sum_{i} f(x)@sup{2}}
+
+Math with accented characters @math{\hat{a}ééççàààà}.
+
+@anchor{Before displaymath}
+
+Displaymath
+@displaymath
+-- f(x) = {1 \over \sigma \sqrt{2\pi}}e@sup{-{1 \over 2}\left({x-\mu \over
\sigma}\right)^2}
+@end displaymath
+after D
+
+@cindex entry
+
+@anchor{After displaymath}
+
+@quotation
+In quotation
+@displaymath
+ f(x)
+= {1\over\sigma\sqrt{2\pi}}
+ e^{-{1\over2}\left({x-\mu\over\sigma}\right)^2}
+@end displaymath
+@end quotation
+
+@node app
+@appendix Appendix
+
+@xref{Before displaymath}.
+
+@xref{After displaymath}.
+
+@printindex cp
+
+@bye
diff --git a/tp/tests/run_parser_all.sh b/tp/tests/run_parser_all.sh
index 288ce41941..bfd9a34060 100755
--- a/tp/tests/run_parser_all.sh
+++ b/tp/tests/run_parser_all.sh
@@ -104,13 +104,32 @@ check_latex2html_and_tex4ht ()
return 0
}
+check_info_math2img ()
+{
+ use_info_math2img=no
+ maybe_use_info_math2img=no
+ if echo "$remaining" | grep 'INFO_MATH_IMAGES.1' >/dev/null; then
+ maybe_use_info_math2img=yes
+ fi
+ if [ $maybe_use_info_math2img = 'yes' ]; then
+ if [ "$no_dvipng" = 'yes' ]; then
+ echo "S: (no dvipng) $current"
+ return 1
+ fi
+ use_info_math2img=yes
+ fi
+ return 0
+}
+
+
# process the output so we can get consistent output for the comparisons
post_process_output ()
{
# With latex2html or tex4ht output is stored in raw_outdir, and files
# are removed or modified from the output directory used for comparisons
# NB there is similar code in many_input_files/tex_{l2h,t4ht}.sh.
- if test "$use_latex2html" = 'yes' || test "$use_tex4ht" = 'yes' ; then
+ if test "$use_latex2html" = 'yes' || test "$use_tex4ht" = 'yes' \
+ || test "$use_info_math2img" = 'yes'; then
cp -pr ${outdir}$dir/ "${raw_outdir}"
@@ -167,6 +186,10 @@ post_process_output ()
rm -f ${outdir}$dir/*.aux ${outdir}$dir/*_images.out \
${outdir}$dir/*_l2h.css ${outdir}$dir/*_l2h_images.pl
else
+ if test "$use_info_math2img" = 'yes' ; then
+ rm -f ${outdir}$dir/*info_math2img.aux
${outdir}$dir/*info_math2img.log \
+ ${outdir}$dir/*info_math2img.dvi
+ fi
sed -e "$sed_cmds" \
$raw_outdir$dir/$basename.2 > $outdir$dir/$basename.2
fi
@@ -249,6 +272,11 @@ if which html2wiki > /dev/null 2>&1; then
no_html2wiki=no
fi
+no_dvipng=yes
+if which dvipng > /dev/null 2>&1; then
+ no_dvipng=no
+fi
+
no_recoded_file_names=yes
if sed 1q input_file_names_recoded_stamp.txt | grep 'OK' >/dev/null; then
no_recoded_file_names=no
@@ -421,6 +449,7 @@ while read line; do
check_need_recoded_file_names || skipped_test=yes
check_need_non_ascii_file_names || skipped_test=yes
check_latex2html_and_tex4ht || skipped_test=yes
+ check_info_math2img || skipped_test=yes
check_unicode_collate_ok || skipped_test=yes
check_strxfrm_ok || skipped_test=yes
if [ "$skipped_test" = 'yes' ] ; then
diff --git a/tp/tests/test_scripts/info_tex_tex_math_info_math_images.sh
b/tp/tests/test_scripts/info_tex_tex_math_info_math_images.sh
new file mode 100755
index 0000000000..6c43379ca6
--- /dev/null
+++ b/tp/tests/test_scripts/info_tex_tex_math_info_math_images.sh
@@ -0,0 +1,25 @@
+#! /bin/sh
+# This file generated by maintain/regenerate_cmd_tests.sh
+
+if test z"$srcdir" = "z"; then
+ srcdir=.
+fi
+
+one_test_logs_dir=test_log
+
+
+
+if test "z$OTHER_TESTS" != z"yes"; then
+ echo "Skipping other tests that are not easily reproducible"
+ exit 77
+fi
+
+dir=info_tex
+name='tex_math_info_math_images'
+mkdir -p $dir
+
+"$srcdir"/run_parser_all.sh -dir $dir $name
+exit_status=$?
+cat $dir/$one_test_logs_dir/$name.log
+exit $exit_status
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: tp/tests/run_parser_all.sh (check_info_math2img, no_dvipng) (post_process_output): add support for INFO_MATH_IMAGES tests.,
Patrice Dumas <=