emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* nondeterministic org-test-with-temp-text?
@ 2020-05-30 13:43 Kevin Liu
  2020-05-30 16:09 ` Nicolas Goaziou
  0 siblings, 1 reply; 9+ messages in thread
From: Kevin Liu @ 2020-05-30 13:43 UTC (permalink / raw)
  To: emacs-orgmode

I’m trying to add a test (which should fail at the moment, representing
an org-mode bug), but it seems like each ‘should’ form is actually
nondeterministic.  The first form returns nil on the first eval and t on
subsequent evals, its behavior resetting upon any command, and the
second form does the inverse, returning t on the first eval and nil on
subsequent evals.

Is this behavior expected?

(ert-deftest test-org/org-next-visible-heading ()
  (should
   (org-test-with-temp-text "* A\n** B\n\n\n* C"
     (org-overview)
     (org-cycle)
     (org-cycle)
     (org-next-visible-heading 1)
     (and (bolp) (org-at-heading-p))))
  (should
   (org-test-with-temp-text "* A\n** B\n\n\n* C"
     (org-overview)
     (org-cycle)
     (org-cycle)
     (org-cycle)
     (org-next-visible-heading 1)
     (and (bolp) (org-at-heading-p)))))


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-06-04 14:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-30 13:43 nondeterministic org-test-with-temp-text? Kevin Liu
2020-05-30 16:09 ` Nicolas Goaziou
2020-05-31  1:52   ` Kevin Liu
2020-05-31 11:09     ` Nicolas Goaziou
2020-06-03 16:27       ` Kevin Liu
2020-06-03 16:31         ` Kevin Liu
2020-06-03 22:26         ` Nicolas Goaziou
2020-06-03 23:08           ` Kevin Liu
2020-06-04 14:10             ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).