Reputation: 9451
I'm writing some small puzzles to learn Emacs Lisp.
However, my current workflow is way too tedious :
eval-region
or eval-buffer
codeeval-region
or eval-buffer
test codeM-x ert
, then press enter to run testsHow do I setup Emacs or the tests, so I can just "run the test" and Emacs will eval all codes for me ?
Upvotes: 3
Views: 408
Reputation:
You probably should not run your tests within your Emacs session anyway. Rather, run the tests in a fresh Emacs session:
$ emacs -Q -b -l my-source-file.el -l my-test-file.el -f ert-run-tests-batch-and-exit
You can run this from M-x compile
.
Upvotes: 3