Browse Source

Merge branch 'maint'

Nicolas Goaziou 11 years ago
parent
commit
379e2b1bea
1 changed files with 16 additions and 8 deletions
  1. 16 8
      testing/lisp/test-ox.el

+ 16 - 8
testing/lisp/test-ox.el

@@ -1119,14 +1119,22 @@ body\n")))
   ;; Provide correct back-end if transcoder needs to use recursive
   ;; calls anyway.
   (should
-   (equal "Success"
-	  (let (org-export--registered-backends)
-	    (org-export-define-backend 'test
-	      '((plain-text . (lambda (bold contents info) "Success"))
-		(headline . (lambda (headline contents info)
-			      (org-export-data
-			       (org-element-property :title headline))))))
-	    (org-export-with-backend 'test "* Test")))))
+   (equal "Success\n"
+	  (let ((test-back-end
+		 (org-export-create-backend
+		  :transcoders
+		  '((headline . (lambda (headline contents info)
+				  (org-export-data
+				   (org-element-property :title headline)
+				   info)))
+		    (plain-text . (lambda (text info) "Success"))))))
+	    (org-export-string-as
+	     "* Test"
+	     (org-export-create-backend
+	      :transcoders
+	      '((headline . (lambda (headline contents info)
+			      (org-export-with-backend
+			       test-back-end headline contents info))))))))))
 
 (ert-deftest test-org-export/data-with-backend ()
   "Test `org-export-data-with-backend' specifications."