| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
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.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instruments
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.)
|
|
|
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.
|