/) {
14 | print OUT;
15 | print OUT '
This is the official manual for the latest Org-mode release.
';
16 | } elsif (/
Table of Contents<\/h2>/) {
17 | print OUT;
18 | print OUT 'http://orgmode.org
';
19 | $toc = 1;
20 | } elsif (/<\/div>/ and $toc) {
21 | print OUT "
";
22 | $toc = 0;
23 | } else {
24 | print OUT;
25 | }
26 | }
27 | system "rm $page.orig";
28 | }
29 |
--------------------------------------------------------------------------------
/testing/lisp/test-org-html.el:
--------------------------------------------------------------------------------
1 | ;;; test-org-html.el
2 |
3 | ;; Copyright (c) ߛ David Maus
4 | ;; Authors: David Maus
5 |
6 | ;; Released under the GNU General Public License version 3
7 | ;; see: http://www.gnu.org/licenses/gpl-3.0.html
8 |
9 | ;;;; Comments:
10 |
11 | ;; Template test file for Org-mode tests
12 |
13 | ;;; Code:
14 | (unless (featurep 'org-html)
15 | (signal 'missing-test-dependency "Support for Org-html"))
16 |
17 | (defmacro org-test-html/export-link (name link expected &optional desc opt-plist)
18 | `(ert-deftest ,(intern (concat "test-org-html/export-link/" name)) ()
19 | ,(or desc name)
20 | (should
21 | (string=
22 | (org-test-strip-text-props
23 | (org-html-handle-links ,link ,opt-plist))
24 | ,expected))))
25 |
26 | (org-test-html/export-link "mailto" "[[mailto:john@example.tld]]"
27 | "