浏览代码

test-ox.el: Account for #+DESCRIPTION is not in ox

* test-ox.el (test-org-export/get-inbuffer-options): Change to reflect
  that #+DESCRIPTION is non-standard keyword.
Rasmus 10 年之前
父节点
当前提交
99b48cf0c4
共有 1 个文件被更改,包括 10 次插入7 次删除
  1. 10 7
      testing/lisp/test-ox.el

+ 10 - 7
testing/lisp/test-ox.el

@@ -153,11 +153,15 @@ variable, and communication channel under `info'."
       (org-export--get-inbuffer-options))
     '(:title ("Some title with spaces"))))
   ;; Test `newline' behaviour.
-  (should
-   (equal
-    (org-test-with-temp-text "#+DESCRIPTION: With\n#+DESCRIPTION: two lines"
-      (org-export--get-inbuffer-options))
-    '(:description "With\ntwo lines")))
+  (let (org-export--registered-backends)
+    (org-export-define-backend 'test nil
+			       :options-alist
+			       '((:description "DESCRIPTION" nil nil newline)))
+    (should
+     (equal
+      (org-test-with-temp-text "#+DESCRIPTION: With\n#+DESCRIPTION: two lines"
+	(org-export--get-inbuffer-options 'test))
+      '(:description "With\ntwo lines"))))
   ;; Test `split' behaviour.
   (should
    (equal
@@ -173,13 +177,12 @@ variable, and communication channel under `info'."
 #+SELECT_TAGS: a
 #+TITLE: a
 #+SETUPFILE: \"%s/examples/setupfile.org\"
-#+DESCRIPTION: l3
 #+LANGUAGE: fr
 #+SELECT_TAGS: c
 #+TITLE: c"
 		org-test-dir)
       (org-export--get-inbuffer-options))
-    '(:description "l1\nl2\nl3":language "fr" :select-tags ("a" "b" "c")
+    '(:language "fr" :select-tags ("a" "b" "c")
 		   :title ("a b c"))))
   ;; More than one property can refer to the same buffer keyword.
   (should