Emacs-lisp tests cannot be run

Hi! When I try to run tests on an emacs-lisp exercise, I get:

❯ exercism test
Running tests via `emacs -batch -l ert -l *-test.el -f ert-run-tests-batch-and-exit`

Loading /etc/emacs/site-start.d/00debian.el (source)...
Loading /etc/emacs/site-start.d/50autoconf.el (source)...
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
Loading debian-ispell (native compiled elisp)...
Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...
Loading /etc/emacs/site-start.d/50figlet.el (source)...
Loading /etc/emacs/site-start.d/50latexmk.el (source)...

Error: file-missing ("Cannot open load file" "No such file or directory" "*-test.el")
  mapbacktrace(#f(compiled-function (evald func args flags) #<bytecode -0x1f9c818ae251796c>))
  debug-early-backtrace()
  debug-early(error (file-missing "Cannot open load file" "No such file or directory" "*-test.el"))
  command-line-1(("-l" "ert" "-l" "*-test.el" "-f" "ert-run-tests-batch-and-exit"))
  command-line()
  normal-top-level()
Cannot open load file: No such file or directory, *-test.el

since the command highlighted in the first line indeed works if launched via shell, I took a deeper look:

❯ strace -fe trace=file exercism test 2>&1 | grep test.el
Running tests via `emacs -batch -l ert -l *-test.el -f ert-run-tests-batch-and-exit`
[pid 3879109] execve("/usr/bin/emacs", ["emacs", "-batch", "-l", "ert", "-l", "*-test.el", "-f", "ert-run-tests-batch-and-exit"], 0xc0001a61e0 /* 58 vars */) = 0
[pid 3879109] readlinkat(AT_FDCWD, "/home/oggei/dev/exercism/emacs-lisp/hello-world/*-test.el", 0x7ffd5f607610, 1024) = -1 ENOENT (No such file or directory)
[...]

and it looks like there is nothing in place to expand that glob (ie. a sh -c).
Even if it looks like a little fix, I’m not able to write golang so I’ll just drop this here :)

Thank you, regards

Thanks for reporting. I’ve created a PR for it, and I’ll try to ping the team to create a new release.

Hey hello! Sorry for the untimely reply, I thought the system notifies replies by email and I didn’t receive it though, I will investigate. Anyway the patch looks promising, thanks for writing it!

We’ve released version 3.3.0 of the CLI yesterday, so if you do exercism upgrade it should work once that’s finished.

1 Like