<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/tests/test-system-defaults-functions.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-05-24T21:12:56+00:00</updated>
<entry>
<title>test: require host-environment in system-defaults tests</title>
<updated>2026-05-24T21:12:56+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-24T21:12:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=9a0560e87867dc2a23767f66940ba4fb4d5a5c20'/>
<id>urn:sha1:9a0560e87867dc2a23767f66940ba4fb4d5a5c20</id>
<content type='text'>
system-defaults reads `env-bsd-p` (host-environment) and `user-home-dir` (user-constants) at load, but the module declares both only via eval-when-compile. Loading the compiled module in isolation leaves `env-bsd-p` void, so the test failed whenever it ran outside a full init. I added the host-environment require alongside the existing user-constants require so the unit loads standalone. The production fix (promoting those eval-when-compile requires to a runtime require) is Phase 2 work, recorded in the module inventory.
</content>
</entry>
<entry>
<title>fix(test): make test-name resilient to load-time cwd changes</title>
<updated>2026-05-22T21:09:49+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-22T21:09:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=4fbe435f515a26ea11732c982900a1f011dff589'/>
<id>urn:sha1:4fbe435f515a26ea11732c982900a1f011dff589</id>
<content type='text'>
make test-name loads every test file into one Emacs, then selects by name. test-system-defaults-functions.el requires system-defaults at load, which runs (setq default-directory user-home-dir), an intentional config choice. That leaked the cwd into the shared session, so every relative -l tests/X.el load after it resolved against the wrong directory and aborted the whole run with Error 255.

I made two changes. test-name now passes absolute paths to -l so loads survive any cwd change, and the test contains the leak by let-binding default-directory around the require. The production setq stays as is.
</content>
</entry>
<entry>
<title>test(system-defaults): switch to single top-level require so undercover instruments</title>
<updated>2026-05-14T12:51:02+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-14T12:51:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=b3307be2c928246bae665f61d03d412f6973561d'/>
<id>urn:sha1:b3307be2c928246bae665f61d03d412f6973561d</id>
<content type='text'>
The helper-functions test was per-test reloading system-defaults.el
via `(load ...)' inside a `cl-letf' sandbox that stubs the
side-effecting primitives (server-start, set-locale-environment,
etc).  Tests passed, but the coverage gauge stayed stuck at 1/12
because undercover.el only instruments the first load of a matching
source; subsequent re-loads inside test bodies don't get tracked,
so the function bodies showed as uncovered even though every test
called them.

Rewrite the test to call `(require 'system-defaults)' once at top
level, wrapped in the same `cl-letf' stubs.  The functions get
instrumented exactly once.  Drop the now-unused per-test sandbox
macro.  Add two more tests for the `(when (memq ...))' list-without-
comp guard and the non-string-message format branch so coverage
reaches 12/12.

(`test-system-defaults-vc-follow-symlinks.el' still uses the
per-test `(load ...)' pattern because that test *is* the
load-side-effect verification, not a function-body test.)
</content>
</entry>
<entry>
<title>test(system-defaults): cover the helper functions</title>
<updated>2026-05-13T21:27:06+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-13T21:27:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=8bfafbfa2620ca5047f2341497de1ff22dcb0a4c'/>
<id>urn:sha1:8bfafbfa2620ca5047f2341497de1ff22dcb0a4c</id>
<content type='text'>
system-defaults.el is mostly `setq` configuration, but the testable helpers (`cj/disabled`, the two minibuffer-gc hooks, `unpropertize-kill-ring`, `cj/log-comp-warning`) were uncovered. New test file mirrors the sandbox pattern from test-system-defaults-vc-follow-symlinks.el and asserts each function's observable behavior: gc-threshold flip on minibuffer entry/exit, kill-ring property strip with empty-ring boundary, comp warning written with timestamp + non-comp type ignored so the default *Warnings* path still works.

8 new tests across Normal / Boundary cases.
</content>
</entry>
</feed>
