From 2103b5779e653a9cb383cfd88e3a56f480c6adfa Mon Sep 17 00:00:00 2001 From: Stig Brautaset Date: Fri, 26 Feb 2016 07:57:39 +0000 Subject: Add support for source code blocks --- test/ox-jira-test.el | 11 +++++++++++ test/ox-jira-test.org | 18 ++++++++++++++++++ 2 files changed, 29 insertions(+) (limited to 'test') diff --git a/test/ox-jira-test.el b/test/ox-jira-test.el index 314b743..07fc442 100644 --- a/test/ox-jira-test.el +++ b/test/ox-jira-test.el @@ -96,6 +96,17 @@ h3. third level 3. fa 3. fum" 'jira)))) +(ert-deftest ox-jira-test/src-blocks () + (should (equal "{code:sh} +echo hello +# echo world +{code} +" (org-export-string-as "#+begin_src sh + echo hello + # echo world + #+end_src +" 'jira)))) + (provide 'ox-jira-test) ;;; ox-jira.el-test.el ends here diff --git a/test/ox-jira-test.org b/test/ox-jira-test.org index 8f7d693..5752b0c 100644 --- a/test/ox-jira-test.org +++ b/test/ox-jira-test.org @@ -176,6 +176,24 @@ 3. fum" 'jira)))) #+END_SRC +** Source code + + I use Org mode for literate programming, and executable lab notes, so we + need to export source code. + + #+BEGIN_SRC emacs-lisp + (ert-deftest ox-jira-test/src-blocks () + (should (equal "{code:sh} + echo hello + # echo world + {code} + " (org-export-string-as "#+begin_src sh + echo hello + # echo world + ,#+end_src + " 'jira)))) + #+END_SRC + ** Provide Announce that =ox-jira-test= is a feature of the current Emacs. -- cgit v1.2.3