|
@@ -465,7 +465,13 @@ CLOCK: [2012-01-01 sun. 00:01]--[2012-01-01 sun. 00:02] => 0:01"
|
|
(should-not
|
|
(should-not
|
|
(org-test-with-temp-text "#+BEGIN_EXAMPLE"
|
|
(org-test-with-temp-text "#+BEGIN_EXAMPLE"
|
|
(org-element-map
|
|
(org-element-map
|
|
- (org-element-parse-buffer) 'example-block 'identity nil t))))
|
|
|
|
|
|
+ (org-element-parse-buffer) 'example-block 'identity nil t)))
|
|
|
|
+ ;; Properly un-escape code.
|
|
|
|
+ (should
|
|
|
|
+ (equal "* Headline\n #+keyword\nText\n"
|
|
|
|
+ (org-test-with-temp-text
|
|
|
|
+ "#+BEGIN_EXAMPLE\n,* Headline\n ,#+keyword\nText\n#+END_EXAMPLE"
|
|
|
|
+ (org-element-property :value (org-element-at-point))))))
|
|
|
|
|
|
(ert-deftest test-org-element/block-switches ()
|
|
(ert-deftest test-org-element/block-switches ()
|
|
"Test `example-block' and `src-block' switches parsing."
|
|
"Test `example-block' and `src-block' switches parsing."
|
|
@@ -1450,7 +1456,13 @@ Outside list"
|
|
;; Ignore incomplete block.
|
|
;; Ignore incomplete block.
|
|
(should-not
|
|
(should-not
|
|
(org-test-with-temp-text "#+BEGIN_SRC"
|
|
(org-test-with-temp-text "#+BEGIN_SRC"
|
|
- (org-element-map (org-element-parse-buffer) 'src-block 'identity))))
|
|
|
|
|
|
+ (org-element-map (org-element-parse-buffer) 'src-block 'identity)))
|
|
|
|
+ ;; Properly un-escape code.
|
|
|
|
+ (should
|
|
|
|
+ (equal "* Headline\n #+keyword\nText\n"
|
|
|
|
+ (org-test-with-temp-text
|
|
|
|
+ "#+BEGIN_SRC org\n,* Headline\n ,#+keyword\nText\n#+END_SRC"
|
|
|
|
+ (org-element-property :value (org-element-at-point))))))
|
|
|
|
|
|
|
|
|
|
;;;; Statistics Cookie
|
|
;;;; Statistics Cookie
|
|
@@ -1911,7 +1923,12 @@ CLOCK: [2012-01-01 sun. 00:01]--[2012-01-01 sun. 00:02] => 0:01"))
|
|
(should
|
|
(should
|
|
(equal (org-test-parse-and-interpret
|
|
(equal (org-test-parse-and-interpret
|
|
"#+BEGIN_EXAMPLE -n -k\n(+ 1 1)\n#+END_EXAMPLE")
|
|
"#+BEGIN_EXAMPLE -n -k\n(+ 1 1)\n#+END_EXAMPLE")
|
|
- "#+BEGIN_EXAMPLE -n -k\n(+ 1 1)\n#+END_EXAMPLE\n")))
|
|
|
|
|
|
+ "#+BEGIN_EXAMPLE -n -k\n(+ 1 1)\n#+END_EXAMPLE\n"))
|
|
|
|
+ ;; Preserve code escaping.
|
|
|
|
+ (should
|
|
|
|
+ (equal (org-test-parse-and-interpret
|
|
|
|
+ "#+BEGIN_EXAMPLE\n,* Headline\n ,#+keyword\nText #+END_EXAMPLE")
|
|
|
|
+ "#+BEGIN_EXAMPLE\n,* Headline\n ,#+keyword\nText #+END_EXAMPLE\n")))
|
|
|
|
|
|
(ert-deftest test-org-element/export-block-interpreter ()
|
|
(ert-deftest test-org-element/export-block-interpreter ()
|
|
"Test export block interpreter."
|
|
"Test export block interpreter."
|
|
@@ -1975,7 +1992,12 @@ CLOSED: [2012-01-01] DEADLINE: <2012-01-01> SCHEDULED: <2012-01-01>\n"))))
|
|
(equal (let ((org-edit-src-content-indentation 2))
|
|
(equal (let ((org-edit-src-content-indentation 2))
|
|
(org-test-parse-and-interpret
|
|
(org-test-parse-and-interpret
|
|
"#+BEGIN_SRC emacs-lisp -n -k\n(+ 1 1)\n#+END_SRC"))
|
|
"#+BEGIN_SRC emacs-lisp -n -k\n(+ 1 1)\n#+END_SRC"))
|
|
- "#+BEGIN_SRC emacs-lisp -n -k\n (+ 1 1)\n#+END_SRC\n")))
|
|
|
|
|
|
+ "#+BEGIN_SRC emacs-lisp -n -k\n (+ 1 1)\n#+END_SRC\n"))
|
|
|
|
+ ;; Preserve code escaping.
|
|
|
|
+ (should
|
|
|
|
+ (equal (org-test-parse-and-interpret
|
|
|
|
+ "#+BEGIN_SRC org\n,* Headline\n ,#+keyword\nText #+END_SRC")
|
|
|
|
+ "#+BEGIN_SRC org\n,* Headline\n ,#+keyword\nText #+END_SRC\n")))
|
|
|
|
|
|
(ert-deftest test-org-element/table-interpreter ()
|
|
(ert-deftest test-org-element/table-interpreter ()
|
|
"Test table, table-row and table-cell interpreters."
|
|
"Test table, table-row and table-cell interpreters."
|