branch: elpa/aidermacs commit a8ec34657f3368023f0ed6f54b9a2465880639f2 Author: Your Name (aider) <y...@example.com> Commit: Your Name (aider) <y...@example.com>
test: add unit tests for aider-buffer-name-from-git-repo-path --- test_aider.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test_aider.el b/test_aider.el index 64f23719dd..68c6fb6acf 100644 --- a/test_aider.el +++ b/test_aider.el @@ -1,4 +1,13 @@ (require 'ert) -;; add your test functions below +(ert-deftest aider-buffer-name-from-git-repo-path-test () + "Test the aider-buffer-name-from-git-repo-path function." + (should (equal (aider-buffer-name-from-git-repo-path "/Users/username/git/repo") + "*aider:~git/repo*")) + (should (equal (aider-buffer-name-from-git-repo-path "/home/username/git/repo") + "*aider:~git/repo*")) + (should (equal (aider-buffer-name-from-git-repo-path "/Users/username/git/repo/subdir") + "*aider:~git/repo/subdir*")) + (should (equal (aider-buffer-name-from-git-repo-path "/home/username/git/repo/subdir") + "*aider:~git/repo/subdir*")))