diff --git a/ox-plumhtml-tests.el b/ox-plumhtml-tests.el index a242efb..c53d8e0 100644 --- a/ox-plumhtml-tests.el +++ b/ox-plumhtml-tests.el @@ -9,6 +9,11 @@ (should (string= expected-result (org-export-string-as org-source 'plumhtml t info))))) +(defun regexp-render-as (expected-regexp org-source &optional info) + (let ((info (plist-put info :html-container nil))) + (should (string-match-p expected-regexp + (org-export-string-as org-source 'plumhtml t info))))) + ;; Tables (ert-deftest body () (should-render-as @@ -44,3 +49,20 @@ (should-render-as "\n\n\n
multi-line
header
body
" "|multi-line|\n|header|\n|---|\n|body|")) + +;; Headers and IDs +(ert-deftest header () + (should-render-as + "

mwee

" + "* mwee")) + +(ert-deftest header-export-ids () + (regexp-render-as + "

mwee

" + "* mwee" '(:export-header-ids t))) + +;; Links and IDs +(ert-deftest link () + (should-render-as + "

example

" + "[[https://example.com][example]]"))