Questions tagged [ert]

ERT is a tool for automated testing in Emacs Lisp. Its main features are facilities for defining tests, running them and reporting the results, and for debugging test failures interactively.

ERT is a tool for automated testing in Emacs Lisp. Its main features are facilities for defining tests, running them and reporting the results, and for debugging test failures interactively.

ERT is similar to tools for other environments such as JUnit, but has unique features that take advantage of the dynamic and interactive nature of Emacs. Despite its name, it works well both for test-driven development and for traditional software development methods.

Emacs ERT manual

11 questions
3
votes
1 answer

Cannot run Emacs ERT tests interactively

I'm trying to run an Emacs ert test interactively, but it doesn't run. I'm following the Emacs ERT guide to run this example test: (require 'ert) (ert-deftest pp-test-quote () "Tests the rendering of `quote' symbols in `pp-to-string'." (should…
lifeisfoo
  • 15,478
  • 6
  • 74
  • 115
3
votes
4 answers

Elisp: sleep-for doesn't block when running a test in ert

I'm trying to set up some tests using ert that need to sleep for a background process to proceed. I've tried using sleep-for and accept-process-output. Neither is reliable. Here is a small example. This test just sleeps for 5 seconds and then checks…
rneatherway
  • 553
  • 3
  • 11
2
votes
0 answers

How should I run Emacs ERT tests when I need GUI tests?

I ran tests with ert-run-tests-batch-and-exit. And it's ok for terminal. But now I need Emacs with GUI to be tested. And technically ert-run-tests-batch-and-exit even works. But the result in a shell will be like: make test make: *** [test] Error…
Sergey
  • 19,487
  • 13
  • 44
  • 68
1
vote
1 answer

Nested (funcall func) exceeds max-lisp-eval-depth, why?

I'm working on two general functions for executing independent unit-tests in elisp. One is about doing something and reset all custom-variables of my package, the other is about doing something in a temp-buffer and reset all custom-variables of my…
lordnik22
  • 48
  • 1
  • 8
1
vote
0 answers

How can we get ERD diagram for all the tables in the database in PLSQL developer?

I am trying to get ERD diagram for all the tables from my database.. is that possible ? I use PL/sql developer.. want to know if there are any plugins or any way to get the same/
1
vote
1 answer

Why does ERT say my test is aborted?

I'm trying out writing some elisp for the first time. I'd like to be able to run unit tests on it. I have a buffer with the following in it: (ert-deftest addition-test () (should (= (+ 1 2) 4))) And I ran M-x eval-buffer to install the…
Patrick Collins
  • 10,306
  • 5
  • 30
  • 69
1
vote
1 answer

Can Emacs ERT tests order be changed?

I've noticed that ERT tests (ert-run-tests-batch-and-exit) in Emacs are executed by name (I mean order). Can I somehow execute tests in the order I define them? For example: (ert-deftest test-2 ... (ert-deftest test-1 ... will execute first…
Sergey
  • 19,487
  • 13
  • 44
  • 68
1
vote
1 answer

Is there a better way to resolve emacs lib dependency?

I came across a problem when I tried to run the test files in a emacs project. For example, I cloned this project into my home directory, cd into test dir and then used emacs -batch -l ert -l nrepl-tests.el -f ert-run-tests-batch-and-exit to run…
yeh
  • 1,496
  • 14
  • 35
1
vote
3 answers

ERT, equality test fails due to different symbols which must be considered same

So, I'm trying to get familiar with ERT, the unit-testing package in Emacs. I want to test macro expansion which uses gensym. I can make sure that gensym produces symbols with the same name, but they are not the same symbol, which causes failure.…
user797257
0
votes
1 answer

ISO ert inline test idiom (appending TEST_OUTPUT from multiple ert calls)

---+ BRIEF Q: if I have multiple, separate, independent calls to ert, can I arrange to concatenate the output of these tests in the same buffer? With the calls to ert being made at different times? (Without a centralized thingamajig that knows…
Krazy Glew
  • 7,210
  • 2
  • 49
  • 62
0
votes
0 answers

Matlab fill matrix with certain value between two lines (Bresenham)

For a school project we need to determine any sort of damage on a carbon fiber sheet with eight metal pins. To determine the damage we use resistivity measurements between multiple points. We us a Matlab script to make the resistance between points…
Dane
  • 1
  • 1