summaryrefslogtreecommitdiff
path: root/modules/ui-theme.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-13 18:22:54 -0500
committerCraig Jennings <c@cjennings.net>2026-05-13 18:22:54 -0500
commit901409d20464e13ea17e04420bc33ca7a6d6e80b (patch)
tree71c7a5bb44e99590306567e6b3907151da799d8c /modules/ui-theme.el
parent35059fbf17a7eb07589fbf4c3fb363a2a69de6e7 (diff)
downloaddotemacs-901409d20464e13ea17e04420bc33ca7a6d6e80b.tar.gz
dotemacs-901409d20464e13ea17e04420bc33ca7a6d6e80b.zip
test(ai-config): cover auth-source, api-key caching, context, clear-buffer
The big-module coverage push starts with ai-config (was 53/191, 27.7%). New test file covers seven helpers that don't depend on a live gptel install: - `cj/auth-source-secret`: returns string secrets, funcall's function secrets, errors on missing. - `cj/anthropic-api-key` / `cj/openai-api-key`: cache the result so subsequent calls don't re-hit auth-source. - `cj/gptel--add-file-to-context`: adds existing files, skips nil and missing paths. - `cj/gptel-clear-buffer`: erases in a gptel-org buffer and reinserts the fresh prefix; no-ops + messages elsewhere. - `cj/gptel-context-clear`: three cond branches (`remove-all`, `clear`, alist-fallback) with appropriate `fboundp` stubs. - `cj/gptel-insert-model-heading`: inserts at the response-begin position with the backend/model heading. External primitives (`auth-source-search`, `gptel-add-file`, `gptel-context-remove-all`, etc.) are stubbed. The fallback test declares `gptel-context--alist` as a top-level `defvar` so `setq` inside the function reaches the dynamic binding under lexical scoping.
Diffstat (limited to 'modules/ui-theme.el')
0 files changed, 0 insertions, 0 deletions