diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-23 20:12:58 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-23 20:12:58 -0400 |
| commit | e41c25068d0cec9434895a6d3e3a25d3a26f645f (patch) | |
| tree | 5e30938a3fd6d80f501ffe3e6c1c187c5ddeb2c9 /tests/test-gptel-tools-read-buffer.el | |
| parent | a936e081b7270fbd4f1e7e9cb67ca1d4c2291ce6 (diff) | |
| download | dotemacs-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-gptel-tools-read-buffer.el')
| -rw-r--r-- | tests/test-gptel-tools-read-buffer.el | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/tests/test-gptel-tools-read-buffer.el b/tests/test-gptel-tools-read-buffer.el deleted file mode 100644 index 0a8548359..000000000 --- a/tests/test-gptel-tools-read-buffer.el +++ /dev/null @@ -1,74 +0,0 @@ -;;; test-gptel-tools-read-buffer.el --- Tests for read_buffer gptel tool -*- lexical-binding: t; -*- - -;;; Commentary: -;; Tests for `cj/read-buffer--get-content', the testable helper that -;; backs the read_buffer gptel tool. - -;;; Code: - -(require 'ert) - -(eval-and-compile - (add-to-list 'load-path (expand-file-name "tests" user-emacs-directory)) - (add-to-list 'load-path (expand-file-name "gptel-tools" user-emacs-directory)) - (setq load-prefer-newer t) - (unless (featurep 'gptel) - (defvar gptel-tools nil) - (defun gptel-make-tool (&rest _args) nil) - (defun gptel-get-tool (&rest _args) nil) - (provide 'gptel))) - -(require 'read_buffer) - -(ert-deftest test-gptel-tools-read-buffer-normal () - "Normal: returns the contents of an existing buffer." - (with-temp-buffer - (rename-buffer "test-gptel-tools-read-buffer-normal" t) - (insert "hello world") - (should (equal (cj/read-buffer--get-content (buffer-name)) "hello world")))) - -(ert-deftest test-gptel-tools-read-buffer-boundary-empty-buffer () - "Boundary: empty buffer returns the empty string." - (with-temp-buffer - (rename-buffer "test-gptel-tools-read-buffer-empty" t) - (should (equal (cj/read-buffer--get-content (buffer-name)) "")))) - -(ert-deftest test-gptel-tools-read-buffer-boundary-buffer-object () - "Boundary: accepts a buffer object as well as a name string." - (with-temp-buffer - (insert "from buffer object") - (should (equal (cj/read-buffer--get-content (current-buffer)) - "from buffer object")))) - -(ert-deftest test-gptel-tools-read-buffer-boundary-widened-content () - "Boundary: returns the whole buffer even when the buffer is narrowed." - (with-temp-buffer - (insert "visible\nhidden\n") - (narrow-to-region (point-min) (line-end-position)) - (should (equal (cj/read-buffer--get-content (current-buffer)) - "visible\nhidden\n")))) - -(ert-deftest test-gptel-tools-read-buffer-boundary-strips-text-properties () - "Boundary: the returned string has no text properties." - (with-temp-buffer - (rename-buffer "test-gptel-tools-read-buffer-props" t) - (insert (propertize "fontified" 'face 'bold)) - (let ((content (cj/read-buffer--get-content (buffer-name)))) - (should (equal content "fontified")) - (should-not (text-properties-at 0 content))))) - -(ert-deftest test-gptel-tools-read-buffer-error-missing-buffer () - "Error: nonexistent buffer name signals." - (when (get-buffer "test-gptel-tools-read-buffer-absent") - (kill-buffer "test-gptel-tools-read-buffer-absent")) - (should-error (cj/read-buffer--get-content - "test-gptel-tools-read-buffer-absent"))) - -(ert-deftest test-gptel-tools-read-buffer-error-killed-buffer-object () - "Error: a killed buffer object signals clearly." - (let ((buffer (generate-new-buffer "test-gptel-tools-read-buffer-killed"))) - (kill-buffer buffer) - (should-error (cj/read-buffer--get-content buffer)))) - -(provide 'test-gptel-tools-read-buffer) -;;; test-gptel-tools-read-buffer.el ends here |
