Leo Butler <leo.but...@umanitoba.ca> writes:

> 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;

As you did, we generally use unwind-protect. Also, we prefer putting
temporary files into temporary directory.

You can grep for `make-temp-file' and `delete-file' in tests. There are
plenty of examples.

> 2. the general absence of similar tests (except in test-ob.el,
>    test-ob/result-graphics-link-type-header-argument).
> ...
> I am unsure about 2. Is the absence of such tests because there is a
> policy against them, or ...

We have no such policy. In fact, many tests are making
temporary files.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to