<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/tests/test-system-utils-eval-buffer.el, branch load-graph-classify-end</title>
<subtitle>My Emacs configuration
</subtitle>
<id>https://git.cjennings.net/dotemacs/atom?h=load-graph-classify-end</id>
<link rel='self' href='https://git.cjennings.net/dotemacs/atom?h=load-graph-classify-end'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/'/>
<updated>2026-04-23T06:37:52+00:00</updated>
<entry>
<title>test(system-utils): cover identify-external-open-command and eval-buffer</title>
<updated>2026-04-23T06:37:52+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-23T06:37:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=73a95c7d1c5ba591a3444f92012be4a281e8d08b'/>
<id>urn:sha1:73a95c7d1c5ba591a3444f92012be4a281e8d08b</id>
<content type='text'>
Adds two per-function test files covering the easily-testable functions in system-utils.el. Takes the module from 0/52 (0%) to 10/52 (19.2%) coverage.

tests/test-system-utils-identify-external-open-command.el — five tests for cj/identify-external-open-command: one each for the three supported platforms (linux, macos, windows), one documenting the dispatch-order invariant when multiple predicates return t, and one for the unsupported-host error case. env-*-p predicates are stubbed via cl-letf so the tests run correctly on any host.

tests/test-system-utils-eval-buffer.el — three tests for cj/eval-buffer-with-confirmation-or-error-message: the valid-elisp success path, an empty-buffer boundary case, and the broken-elisp error path (confirming the condition-case wrapper catches errors rather than propagating). A small macro stubs message to capture what the user would see.

Split into two files per the project's per-function test convention (elisp-testing.md).

Not covered in this commit and flagged for follow-up:

- cj/open-file-with-command and cj/xdg-open mix user-input resolution with process launching. Per elisp-testing.md's "split interactive from internal" rule, a pure file-resolution helper should be extracted before tests are written.
- cj/server-shutdown kills Emacs, so it isn't meaningfully testable.
</content>
</entry>
</feed>
