branch: externals/org-transclusion
commit 1e339775835eaee06234f6c29b904ec0cd29efa9
Author: Noboru Ota <[email protected]>
Commit: Noboru Ota <[email protected]>

    test: Fix noweb unit test file
---
 test/unit-tests.el | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/test/unit-tests.el b/test/unit-tests.el
index a46bdfccb4..977776e08c 100644
--- a/test/unit-tests.el
+++ b/test/unit-tests.el
@@ -19,15 +19,16 @@
 (ert-deftest org-transclusion-test-noweb-chunk ()
   "Test `:noweb-chunk' property."
   (let* ((filename-test "test-noweb-chunk.org")
-        (filename-expected "test-noweb-chunk-detached.org")
-        (buf-test (progn (find-file filename-test)
-                         (get-buffer filename-test)))
-        (buf-expected (progn (find-file filename-expected)
-                             (get-buffer filename-expected))))
+         (filename-expected "test-noweb-chunk-detached.org")
+         (buf-test (progn (find-file filename-test)
+                          (org-transclusion-add-all) ;transclude explicitly
+                          (get-buffer filename-test)))
+         (buf-expected (progn (find-file filename-expected)
+                              (get-buffer filename-expected))))
     (should (equal (compare-buffer-substrings
-                   buf-test nil nil
-                   buf-expected nil nil)
-                  0))
+                    buf-test nil nil
+                    buf-expected nil nil)
+                   0))
     ;; clean up
     (kill-buffer buf-test)
     (kill-buffer buf-expected)
@@ -49,7 +50,7 @@ Used to created the `..-detached.org' files for unit testing."
       (goto-char (point-min))
       (while (setq match (text-property-search-forward 'org-transclusion-id))
         (goto-char (prop-match-beginning match))
-       (org-transclusion-detach))
+        (org-transclusion-detach))
       (goto-char current-marker)
       (move-marker current-marker nil) ; point nowhere for GC
       list)))

Reply via email to