Slowly making emacs mode progres. I am now trying to reverse engineer how org-mode collects all of its tests and runs them. This is a lot of unexpected work. Emacs I think really needs to put together a sort of test framework on top of `ert`.

A routine or function like '"run all tests in found in .el files in a directory called test" is not the kind of thing I want to be having to write myself. I want to write the mode, not a mini test framework.

Will I be nerd sniped into trying to write that? I sure hope not.

Time will tell.

Show thread

@trurl I like the idea of a makefile running batch tests. Org has some _quite complex_ facilities for doing interactive testing which I think would be very cool to turn into some kind of library. For instance:

They also are able to limit what tests run by regex, and other nice things.

@matty have you gotten interactive testing to work for you? I ran into too many problems running tests inside of a persistent Emacs editing session due to a lack of hermeticity. (Same with running Clojure tests interactively through SLIME in a same session I'm also writing new code in. Too easy to redefine an interface or symbol in one place but not another. Maybe I'm doing Lisp wrong.)

Not yet! Took a break.

I'm still not a real lisp expert, but I think your typical lisp workflow would see you isolating your function symbols in a package, and then your one-off definitions could live in the default CL-USER package.

You might reload your entire package to keep it entirely in sync, and your tests would simply make use of that package with use-package.

Emacs is quite different than a CL image, but similarly you'd re-evaluate your lib to clobber one-off symbol defs I think

Being able to redefine things on the fly is an absolutely amazing feature of lisp and the image style of development.

Being able to drop into the debugger, redefine a variable, or an entire function, then replay your program from a few stack frames previous is a totally cool way to develop things.

Sign in to participate in the conversation
Mastodon @ SDF

"I appreciate SDF but it's a general-purpose server and the name doesn't make it obvious that it's about art." - Eugen Rochko