emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] ERT: body of org-test-with-temp-text-in-file


From: Michael Brand
Subject: [O] ERT: body of org-test-with-temp-text-in-file
Date: Fri, 14 Dec 2012 15:05:55 +0100

Hi all

The doc of org-test-with-temp-text-in-file says

    (org-test-with-temp-text-in-file TEXT &rest BODY)
    Run body in a temporary file buffer with Org-mode as the active mode.

so I thought I can write:

#+BEGIN_SRC emacs-lisp
  (ert-deftest trial/fail ()
    (org-test-with-temp-text-in-file "
  |   |
  "
      (forward-line)
      (should (org-at-table-p))))
#+END_SRC

but this ERT fails, it passes only if I move what I thought is a body
into a progn:

#+BEGIN_SRC emacs-lisp
  (ert-deftest trial/pass ()
    (org-test-with-temp-text-in-file "
  |   |
  "
      (progn
        (forward-line)
        (should (org-at-table-p)))))
#+END_SRC

Is this difference expected? What did I miss?

(Emacs 24.2.1 with yesterday’s release_7.9.2-695-g31d24a)

Michael



reply via email to

[Prev in Thread] Current Thread [Next in Thread]