Hello, I am patching a bug in ob-octave.el (see attachment) involving the creation of graphics files. The bug itself is easy to fix: a single line in ob-octave.el ensures the special variable `ans' is bound, to prevent Octave from exiting with a non-zero exit code. However, I would like feedback/suggestions on writing such a test. Issues include: 1. how to clean up the side-effects, including changes in the test buffer, filesystem and potentially creating an error buffer; 2. the general absence of similar tests (except in test-ob.el, test-ob/result-graphics-link-type-header-argument). To address 1., I have wrapped the tests in an `unwind-protect' form to ensure clean-up code gets run. The ERT manual does not suggest much beyond this. At the moment, when the test is run, clean-up is being done whether the test fails or passes. I am unsure about 2. Is the absence of such tests because there is a policy against them, or ... Leo