* ERT: body of org-test-with-temp-text-in-file
@ 2012-12-14 14:05 Michael Brand
2012-12-15 8:19 ` Bastien
0 siblings, 1 reply; 3+ messages in thread
From: Michael Brand @ 2012-12-14 14:05 UTC (permalink / raw)
To: Org Mode
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ERT: body of org-test-with-temp-text-in-file
2012-12-14 14:05 ERT: body of org-test-with-temp-text-in-file Michael Brand
@ 2012-12-15 8:19 ` Bastien
2012-12-15 9:10 ` Michael Brand
0 siblings, 1 reply; 3+ messages in thread
From: Bastien @ 2012-12-15 8:19 UTC (permalink / raw)
To: Michael Brand; +Cc: Org Mode
Hi Michael,
Michael Brand <michael.ch.brand@gmail.com> writes:
> 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
Now you can. There were no real reason to force using (progn ...)
here so I removed that and updated the test suite accordingly.
Let me know if this works for you now.
Best,
--
Bastien
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ERT: body of org-test-with-temp-text-in-file
2012-12-15 8:19 ` Bastien
@ 2012-12-15 9:10 ` Michael Brand
0 siblings, 0 replies; 3+ messages in thread
From: Michael Brand @ 2012-12-15 9:10 UTC (permalink / raw)
To: Bastien; +Cc: Org Mode
Hi Bastien
On Sat, Dec 15, 2012 at 9:19 AM, Bastien <bzg@altern.org> wrote:
> Now you can. There were no real reason to force using (progn ...)
> here so I removed that and updated the test suite accordingly.
>
> Let me know if this works for you now.
Yes, thank you.
Michael
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-12-15 9:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-14 14:05 ERT: body of org-test-with-temp-text-in-file Michael Brand
2012-12-15 8:19 ` Bastien
2012-12-15 9:10 ` Michael Brand
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.