texinfo.html.test 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. ;;;; texinfo.html.test -*- scheme -*-
  2. ;;;;
  3. ;;;; Copyright (C) 2016 Free Software Foundation, Inc.
  4. ;;;;
  5. ;;;; This library is free software; you can redistribute it and/or
  6. ;;;; modify it under the terms of the GNU Lesser General Public
  7. ;;;; License as published by the Free Software Foundation; either
  8. ;;;; version 3 of the License, or (at your option) any later version.
  9. ;;;;
  10. ;;;; This library is distributed in the hope that it will be useful,
  11. ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. ;;;; Lesser General Public License for more details.
  14. ;;;;
  15. ;;;; You should have received a copy of the GNU Lesser General Public
  16. ;;;; License along with this library; if not, write to the Free Software
  17. ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  18. ;;; Commentary:
  19. ;;
  20. ;; Unit tests for (texinfo html).
  21. ;;
  22. ;;; Code:
  23. (define-module (test-suite texinfo-html)
  24. #:use-module (test-suite lib)
  25. #:use-module (texinfo)
  26. #:use-module (texinfo html))
  27. (define (texi-fragment->shtml str)
  28. (stexi->shtml (texi-fragment->stexi str)))
  29. (pass-if-equal '(div (ul (li (p "foo"))))
  30. (texi-fragment->shtml "@itemize\n@item foo\n@end itemize\n"))
  31. (pass-if-equal '(div (p (acronym "GNU")))
  32. (texi-fragment->shtml "@acronym{GNU}\n"))