Manually revert back to commit e85080.
[org-mode.git] / testing / lisp / test-org-html.el
blobc2cc067f10e28e4c19608c86fe732540ba022ca6
1 ;;; test-org-html.el
3 ;; Copyright (c) ߛ David Maus
4 ;; Authors: David Maus
6 ;; Released under the GNU General Public License version 3
7 ;; see: http://www.gnu.org/licenses/gpl-3.0.html
9 ;;;; Comments:
11 ;; Template test file for Org-mode tests
14 ;;; Code:
15 (let ((load-path (cons (expand-file-name
16 ".." (file-name-directory
17 (or load-file-name buffer-file-name)))
18 load-path)))
19 (require 'org-test)
20 (require 'org-test-ob-consts))
23 ;;; Tests
24 (require 'org-html)
26 (defmacro org-test-html/export-link (name link expected &optional desc opt-plist)
27 `(ert-deftest ,(intern (concat "test-org-html/export-link/" name)) ()
28 ,(or desc name)
29 (should
30 (string=
31 (org-test-strip-text-props
32 (org-html-handle-links ,link ,opt-plist))
33 ,expected))))
35 (org-test-html/export-link "mailto" "[[mailto:john@example.tld]]"
36 "<a href=\"mailto:john@example.tld\">mailto:john@example.tld</a>"
37 "mailto: link without description")
39 (provide 'test-org-html)
41 ;;; test-org-html.el ends here