I have written a few simple tests, when I run them on the buffer inside emacs everything passes.
However, when I run them in batch mode as shown below, it fails. What can explain this?
emacs -batch -l ert -l mytests.el -f ert-run-tests-batch-and-exit
Here's the output from one of the failing tests:
Test pp-test-docker-container-names backtrace:
(let ((container_ids (split-string (dc-docker-run-return "ps -q" ""
dc-docker-names()
(list (dc-docker-names) (quote (nil)))
(let ((fn-89805 (function equal)) (args-89806 (list (dc-docker-names
(progn (fset (quote shell-command-to-string) vnew) (let ((fn-89805 (
(unwind-protect (progn (fset (quote shell-command-to-string) vnew) (
(let* ((vnew (function (lambda (_) ""))) (old (symbol-function (quot
(closure (t) nil (let* ((vnew (function (lambda (_) ""))) (old (symb
#[0 "\306\307!r\211q\210\310\311\312\313\314\315!\316\"\317\320%DC
funcall(#[0 "\306\307!r\211q\210\310\311\312\313\314\315!\316\"\31
ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc
#[0 "r\304 q\210\305 )\306\307\310\311\312\313!\314\"\315\316%DC\2
funcall(#[0 "r\304 q\210\305 )\306\307\310\311\312\313!\314\"\315\
ert-run-test([cl-struct-ert-test pp-test-docker-container-names "Tes
ert-run-or-rerun-test([cl-struct-ert--stats t [[cl-struct-ert-test p
ert-run-tests(t #[385 "\306\307\"\203D\211\211G\310U\203\211@\20
ert-run-tests-batch(nil)
ert-run-tests-batch-and-exit()
command-line-1(("-l" "ert" "-l" "docker-compose.el" "-f" "ert-run-te
command-line()
normal-top-level()
Test pp-test-docker-container-names condition:
(void-function loop)
FAILED 2/2 pp-test-docker-container-names
Any ideas ?