aboutsummaryrefslogtreecommitdiff
path: root/tests/test-custom-ordering-unarrayify.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
commit0d5a28d8f8b12332a132005fcf4ef4e2a86f8904 (patch)
treea48f40bf4c38559c948a90f259dfe9685d0dabd6 /tests/test-custom-ordering-unarrayify.el
parent1b9343bd9918e9d43dc1f3325fe42c5f437b2084 (diff)
downloaddotemacs-0d5a28d8f8b12332a132005fcf4ef4e2a86f8904.tar.gz
dotemacs-0d5a28d8f8b12332a132005fcf4ef4e2a86f8904.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 'tests/test-custom-ordering-unarrayify.el')
0 files changed, 0 insertions, 0 deletions