diff options
| author | Craig Jennings <c@cjennings.net> | 2026-04-30 08:25:45 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-04-30 09:13:43 -0500 |
| commit | 875fb139f0ebe1e2af9a4f7ec47038fed8a0c04f (patch) | |
| tree | bf93feb385f494bd947ba2d34a60400e908ef77d /modules/diff-config.el | |
| parent | f4f50b14447a4f6f90f8c3f0cb3361efe4088b39 (diff) | |
| download | dotemacs-875fb139f0ebe1e2af9a4f7ec47038fed8a0c04f.tar.gz dotemacs-875fb139f0ebe1e2af9a4f7ec47038fed8a0c04f.zip | |
test(host-environment): cover laptop/desktop, platform, display, timezone predicates
Four new test files extending the existing test-host-environment.el
(which already covered the two battery helpers).
- platform-predicates: env-linux-p, env-bsd-p, env-macos-p, env-windows-p
walked across every supported system-type value. 8 tests.
- display-predicates: env-x-p, env-x11-p, env-wayland-p, env-terminal-p,
env-gui-p exercised under every relevant combination of window-system,
WAYLAND_DISPLAY, and display-graphic-p. 13 tests.
- env-laptop-p: composition over the helpers, with Linux dispatch
isolated from non-Linux dispatch via system-type binding. 8 tests
including env-desktop-p as the inverse. battery-status-function is
forward-declared in this test file (initialized to nil) so cl-letf's
symbol-value place can read the prior value without hitting
void-variable.
- detect-system-timezone: the four-method priority chain. Mocks
cj/match-localtime-to-zoneinfo and getenv at the boundary; uses
cl-letf on file-exists-p / insert-file-contents to exercise the
/etc/timezone fall-through without touching real system files.
5 tests.
34 new tests for host-environment, all passing. Full suite green.
Diffstat (limited to 'modules/diff-config.el')
0 files changed, 0 insertions, 0 deletions
