Is it possible to run one or few prove tests when I eval sexp in Emacs?
svetlyak40wt opened this issue · 4 comments
I want to run selected tests on sexp evaluation and to show tests status in Emacs's status-bar.
What is the best way to do it?
I bet it depends on how you write and organize your tests, can we see an example ?
Lately I had tests surrounded by a form, like this:
(with-dynamic-stubs ((dex:get htmlpage)
…
(ok (with-output-to-string (out)
(…
(is 6
(length
so evaluating inside the test ok
or is
ran the two. I isolated them with a macro, factoring the (with-dynamic-stubs…
. Is this your question ?
Also this Emacs thing, is it particular to Prove, do you do this with another test framework ?
Yes, I have similar tests: https://github.com/40ants/hacrm/blob/master/t/plugins/birthdays.lisp#L10-L17
I imaging an Emacs plugin in which I can mark any lisp form as a form to evaluate on next slime-compile-defun
. And when I do C-c C-c
slime will run all marked forms.
Probably, will write a prototype minor mode with this functionality.
I see, that would be nice, and maybe more flexible than prove's skip
.
I'd ask on SO or Emacs Stack Exchange too.
Closing this old issue. Thanks to https://12forks.com MVP for pointing to it.