aboutsummaryrefslogtreecommitdiff
path: root/tests/test-ai-config-model-to-string.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-23 20:12:58 -0400
committerCraig Jennings <c@cjennings.net>2026-06-23 20:12:58 -0400
commite41c25068d0cec9434895a6d3e3a25d3a26f645f (patch)
tree5e30938a3fd6d80f501ffe3e6c1c187c5ddeb2c9 /tests/test-ai-config-model-to-string.el
parenta936e081b7270fbd4f1e7e9cb67ca1d4c2291ce6 (diff)
downloaddotemacs-e41c25068d0cec9434895a6d3e3a25d3a26f645f.tar.gz
dotemacs-e41c25068d0cec9434895a6d3e3a25d3a26f645f.zip
chore(ai): archive gptel and remove it from the live config
I archived gptel to archive/gptel/ since I rarely use it. Moved there: the six gptel modules (ai-config, ai-conversations, ai-conversations-browser, ai-mcp, ai-quick-ask, ai-rewrite), the gptel-tools/ directory, custom/gptel-prompts.el, their test files and utilities, and the four gptel-only specs. Scrubbed from the live config: the ai-config require in init.el, which also drops the whole C-; a keymap; the gptel-mode emojify hook in font-config.el; the gptel-tools entries in the Makefile clean target and the coverage runner; and the gptel feature notes in README. Cancelled the open gptel tasks in todo.org (the AI Open Work issues, the feature-extension brainstorm, the velox gptel-magit bug). ai-term stays. It is the ghostel Claude launcher, independent of gptel. Verified: every module loads, a batch init launch reaches completion clean, and the full test suite shows only pre-existing coverage failures unrelated to this change.
Diffstat (limited to 'tests/test-ai-config-model-to-string.el')
-rw-r--r--tests/test-ai-config-model-to-string.el60
1 files changed, 0 insertions, 60 deletions
diff --git a/tests/test-ai-config-model-to-string.el b/tests/test-ai-config-model-to-string.el
deleted file mode 100644
index aa1149272..000000000
--- a/tests/test-ai-config-model-to-string.el
+++ /dev/null
@@ -1,60 +0,0 @@
-;;; test-ai-config-model-to-string.el --- Tests for cj/gptel--model-to-string -*- lexical-binding: t; -*-
-
-;;; Commentary:
-;; Tests for cj/gptel--model-to-string from ai-config.el.
-;;
-;; Pure function that converts a model identifier (string, symbol, or
-;; other type) to a string representation. Branches on input type:
-;; string (identity), symbol (symbol-name), fallback (format).
-
-;;; Code:
-
-(require 'ert)
-
-(add-to-list 'load-path (expand-file-name "tests" user-emacs-directory))
-(add-to-list 'load-path (expand-file-name "modules" user-emacs-directory))
-(require 'testutil-ai-config)
-(require 'ai-config)
-
-;;; Normal Cases
-
-(ert-deftest test-ai-config-model-to-string-normal-string-returns-string ()
- "String model name should be returned unchanged."
- (should (equal (cj/gptel--model-to-string "claude-opus-4-6") "claude-opus-4-6")))
-
-(ert-deftest test-ai-config-model-to-string-normal-symbol-returns-symbol-name ()
- "Symbol model name should return its symbol-name."
- (should (equal (cj/gptel--model-to-string 'gpt-4o) "gpt-4o")))
-
-(ert-deftest test-ai-config-model-to-string-normal-number-returns-formatted ()
- "Numeric input should be formatted as a string."
- (should (equal (cj/gptel--model-to-string 42) "42")))
-
-;;; Boundary Cases
-
-(ert-deftest test-ai-config-model-to-string-boundary-empty-string-returns-empty ()
- "Empty string should be returned as empty string."
- (should (equal (cj/gptel--model-to-string "") "")))
-
-(ert-deftest test-ai-config-model-to-string-boundary-nil-returns-nil-string ()
- "Nil is a symbol, so should return \"nil\"."
- (should (equal (cj/gptel--model-to-string nil) "nil")))
-
-(ert-deftest test-ai-config-model-to-string-boundary-keyword-symbol-includes-colon ()
- "Keyword symbol should return its name including the colon."
- (should (equal (cj/gptel--model-to-string :some-model) ":some-model")))
-
-(ert-deftest test-ai-config-model-to-string-boundary-list-uses-format-fallback ()
- "List input should hit the fallback format branch."
- (should (equal (cj/gptel--model-to-string '(a b)) "(a b)")))
-
-(ert-deftest test-ai-config-model-to-string-boundary-vector-uses-format-fallback ()
- "Vector input should hit the fallback format branch."
- (should (equal (cj/gptel--model-to-string [1 2]) "[1 2]")))
-
-(ert-deftest test-ai-config-model-to-string-boundary-string-with-spaces-unchanged ()
- "String with spaces should be returned unchanged."
- (should (equal (cj/gptel--model-to-string "model with spaces") "model with spaces")))
-
-(provide 'test-ai-config-model-to-string)
-;;; test-ai-config-model-to-string.el ends here