>> The other failing tests are >> subr-test-backtrace-integration-test and cl-lib-defstruct-record. > > Hmm, I'll see if I can fix these. Thanks. I noticed when byte-compiling cl-lib-tests, I got this warning: Unused lexical variable ‘cl-struct-foo’. >>> What about tests like this? >>> >>> (ert-deftest check-error-handling () >>> (should >>> (eq 42 >>> (condition-case () >>> (/ 1 0) >>> (arith-error 42))))) >> >> It works for me, yes. As long as `debugger' is set to a symbol. I can >> make it a bit more robust by using an additional defvar in >> ert--run-test-internal. >> >> Are you asking because it doesn't work for you? > > No, I'm just trying to explore the edges of this solution. Isn't > `debugger' bound to a non-symbol while running the the tests? I'm > confused as to why this solution works. Yes, that's why there's the second test that checks for error-symbol to be ert-test-{failed, skipped}. Basically what's happening is that ert--signal-hook forces the debugger to trigger even inside a condition-case, but only with a non-symbol `debugger' (since ert--run-test-internal binds it to a closure), and one of the above two errors. The only time this approach fails is when you bind `debugger' to a non-symbol and also signal ert-test-{failed, skipped}. This is relatively rare compared to the problems at hand (macro and argument errors), so unless there are unforeseen issues I think it's an acceptable stop-gap solution. Hopefully Someone™ can properly fix this eventually.