latex2html.test 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #! /bin/sh
  2. # Copyright (C) 2006, 2007 Free Software Foundation, Inc.
  3. #
  4. # This file is part of GNU Texinfo.
  5. #
  6. # GNU Texinfo is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 3 of the License,
  9. # or (at your option) any later version.
  10. #
  11. # GNU Texinfo is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. required='hevea'
  19. . ./defs || exit 1
  20. set -e
  21. # Force the creation of auxiliary files.
  22. # Force it to be big enough to trigger the info file splitting.
  23. {
  24. echo "\tableofcontents"
  25. for section in 1 2 3 4 5 6
  26. do
  27. echo "\section{$i}"
  28. for subsection in 1 2 3 4 5 6
  29. do
  30. echo "\subsection{$i}"
  31. echo "$latex_paragraph"
  32. done
  33. done
  34. } |
  35. create_input_tex
  36. # run_hevea_check FORMAT OPTIONS
  37. # ------------------------------
  38. run_hevea_check ()
  39. {
  40. title "$@"
  41. format="$1"
  42. shift
  43. # Testing the local build mode.
  44. TEXI2DVI_pass --batch --$format "$@" input.tex
  45. # Compute the expected output.
  46. outfiles=input.$out
  47. case $format in
  48. info) outfiles="$outfiles input.info-1 input.info-2";;
  49. esac
  50. # Compute the aux files.
  51. case $format:$@ in
  52. *clean* ) auxfiles='';;
  53. *tidy* ) auxfiles='input.t2d';;
  54. html:*|text:* ) auxfiles='input.haux input.htoc';;
  55. dvi:* ) auxfiles='input.aux input.log input.toc';;
  56. * ) auxfiles='';;
  57. esac
  58. # There should only be the expected output and the source file.
  59. assert_files input.tex $outfiles $auxfiles
  60. rm -fr $outfiles $auxfiles
  61. }
  62. for opt in "" "--clean" "--tidy"
  63. do
  64. for out in html info text
  65. do
  66. run_hevea_check $out $opt
  67. done
  68. done