<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/tests/test-host-environment--platform-predicates.el, branch main</title>
<subtitle>My Emacs configuration
</subtitle>
<id>https://git.cjennings.net/dotemacs/atom?h=main</id>
<link rel='self' href='https://git.cjennings.net/dotemacs/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/'/>
<updated>2026-04-30T14:13:43+00:00</updated>
<entry>
<title>test(host-environment): cover laptop/desktop, platform, display, timezone predicates</title>
<updated>2026-04-30T14:13:43+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-30T13:25:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=21d5a737f0278baeafd4d72e59cc9505043d91a9'/>
<id>urn:sha1:21d5a737f0278baeafd4d72e59cc9505043d91a9</id>
<content type='text'>
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.
</content>
</entry>
</feed>
