Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for inline src-block #27

Merged
merged 1 commit into from Mar 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 9 additions & 2 deletions test/ox-linuxmag-fr-tests.el
Expand Up @@ -28,6 +28,7 @@

(require 'ert)
(require 'ox-linuxmag-fr)
(require 'ob-shell)

(defconst ox-linuxmag-fr-tests-default-preamble
"#+title: Titre de l'article
Expand All @@ -48,7 +49,8 @@ Make the buffer containing the result current.

OX-LINUXMAG-FR-FIGURE-FILES and OX-LINUXMAG-FR-OTHER-FILES are
hashtables. OX-LINUXMAG-FR-BASENAME is a string."
(let* ((xml-content (with-temp-buffer
(let* ((org-confirm-babel-evaluate nil)
(xml-content (with-temp-buffer
(unless (string-prefix-p "#+title:" string)
(insert ox-linuxmag-fr-tests-default-preamble)
(insert "\n"))
Expand All @@ -59,7 +61,8 @@ hashtables. OX-LINUXMAG-FR-BASENAME is a string."
:ox-linuxmag-fr-other-files
ox-linuxmag-fr-other-files
:ox-linuxmag-fr-basename
ox-linuxmag-fr-basename))))
ox-linuxmag-fr-basename
:with-latex 'verbatim))))
(buffer (get-buffer-create "*ox-linuxmag-fr-test*")))
(switch-to-buffer buffer)
(erase-buffer)
Expand Down Expand Up @@ -116,6 +119,10 @@ hashtables. OX-LINUXMAG-FR-BASENAME is a string."
(ox-linuxmag-fr-tests-export "Test =foo=")
(should (ox-linuxmag-fr-tests-contain "Test <text:span text:style-name=\"code_5f_par\">foo</text:span>")))

(ert-deftest ox-linuxmag-fr-tests-inline-src-block ()
(ox-linuxmag-fr-tests-export "Test src_sh{echo foo}")
(should (ox-linuxmag-fr-tests-contain "Test <text:span text:style-name=\"code_5f_par\">foo</text:span>")))

(ert-deftest ox-linuxmag-fr-tests-headline-numbered ()
(ox-linuxmag-fr-tests-export "* Titre 1\n** Titre 1.1")
(should (ox-linuxmag-fr-tests-contain "<text:h text:style-name=\"Heading_20_1\">1. Titre 1</text:h>"))
Expand Down