<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/tests/test-prog-webdev--format-wiring.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-30T15:30:32+00:00</updated>
<entry>
<title>test(prog): drop ignore-errors on prog-module require, add featurep check</title>
<updated>2026-04-30T15:30:32+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-30T15:30:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=e2f373ff05116d4b2ed48d4ddcaea8c47846f105'/>
<id>urn:sha1:e2f373ff05116d4b2ed48d4ddcaea8c47846f105</id>
<content type='text'>
Two small tightening passes on the formatter wiring tests just shipped.

Drops `(ignore-errors ...)` from each test file's
`(require 'prog-PKG)' call. Soft use-package warnings (e.g. lsp-pyright
not being installed) still emit messages without aborting the load. A
hard load failure (syntax error, missing required dep) would now
surface as a test error rather than being silently swallowed.

Adds a `(should (featurep PKG))' assertion per language so the test
output makes "package loaded" visible alongside the fboundp and
binding checks. For webdev the assertion is `(featurep 'prog-webdev)'
since the formatter command is defined directly in prog-webdev.el
(it shells out to the prettier CLI, no separate package to load).

17 tests total now (up from 13), all passing.
</content>
</entry>
<entry>
<title>test(prog): cover formatter wiring for python, go, shell, typescript</title>
<updated>2026-04-30T15:24:39+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-30T15:24:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=bb936fc082d4feb6a8759399ae07c840ea386b68'/>
<id>urn:sha1:bb936fc082d4feb6a8759399ae07c840ea386b68</id>
<content type='text'>
Four test files plus a shared testutil that locks in the formatter
bindings on C-; f across the four languages. Each test file checks:

- the format command is fboundp after the relevant package loads
- the C-; f binding resolves to that command (in the relevant
  mode-map, or in the buffer-local map for hook-based wiring)
- the underlying executable is on PATH (skipped via ert-skip if
  not installed)

No production change. The bindings were already at C-; f via two
mechanisms. Use-package :bind handles python and shell. The other
two install via local-set-key inside a hook. This regression net
catches silent breakage if any of those wirings get reshaped later.

The shared tests/testutil-format-wiring.el carries
format-test--ensure-packages-init, which calls package-initialize
once per batch run, since make test runs Emacs with --no-site-file
--no-site-lisp. Without it, use-package can't find blacken / shfmt
/ go-mode in elpa/. Also format-test--skip-unless-executable wraps
ert-skip with a clear "not on PATH" message so missing tools fail
informatively.

Per-language wiring inventory (no changes, just locked in):
- Python: blacken-buffer in python-ts-mode-map (use-package :bind)
- Shell: shfmt-buffer in sh-mode-map and bash-ts-mode-map
  (use-package :bind, gated on :if executable-find)
- Go: gofmt via cj/go-mode-keybindings hook
- TS/JS/Web: cj/webdev-format-buffer via cj/webdev-keybindings hook

13 tests across 4 files, all passing.
</content>
</entry>
</feed>
