[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ellama 6c2668af0c 4/9: Add more format tests
From: |
ELPA Syncer |
Subject: |
[elpa] externals/ellama 6c2668af0c 4/9: Add more format tests |
Date: |
Wed, 3 Apr 2024 15:58:56 -0400 (EDT) |
branch: externals/ellama
commit 6c2668af0c8b824794141a9232d1307121f5395e
Author: Roman Scherer <roman@burningswell.com>
Commit: Roman Scherer <roman@burningswell.com>
Add more format tests
---
tests/test-ellama.el | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/tests/test-ellama.el b/tests/test-ellama.el
index 405dca76f4..5e43ff12df 100644
--- a/tests/test-ellama.el
+++ b/tests/test-ellama.el
@@ -67,6 +67,24 @@
(should (equal "[[file:test.el][test.el]]"
(ellama-context-element-format element 'org-mode)))))
+(ert-deftest test-ellama-context-element-format-info-node-markdown ()
+ (let ((element (ellama-context-element-info-node :name "(dir)Top")))
+ (should (equal "```emacs-lisp\n(info \"(dir)Top\")\n```\n"
+ (ellama-context-element-format element 'markdown-mode)))))
+
+(ert-deftest test-ellama-context-element-format-info-node-org-mode ()
+ (let ((element (ellama-context-element-info-node :name "(dir)Top")))
+ (should (equal "[[(dir)Top][(dir)Top]]"
+ (ellama-context-element-format element 'org-mode)))))
+
+(ert-deftest test-ellama-context-element-format-text-markdown ()
+ (let ((element (ellama-context-element-text :content "123")))
+ (should (equal "123" (ellama-context-element-format element
'markdown-mode)))))
+
+(ert-deftest test-ellama-context-element-format-text-org-mode ()
+ (let ((element (ellama-context-element-text :content "123")))
+ (should (equal "123" (ellama-context-element-format element 'org-mode)))))
+
(provide 'test-ellama)
;;; test-ellama.el ends here
- [elpa] externals/ellama updated (d9d3cb67f6 -> a931224a0d), ELPA Syncer, 2024/04/03
- [elpa] externals/ellama 6c367ec787 2/9: Add context element classes, ELPA Syncer, 2024/04/03
- [elpa] externals/ellama 6c2668af0c 4/9: Add more format tests,
ELPA Syncer <=
- [elpa] externals/ellama 85b9df7131 1/9: Add extendable context elements, ELPA Syncer, 2024/04/03
- [elpa] externals/ellama 42da4b22d5 3/9: Use context element classes, ELPA Syncer, 2024/04/03
- [elpa] externals/ellama 1f54da439e 7/9: use warn instead of user error, ELPA Syncer, 2024/04/03
- [elpa] externals/ellama 1666b40345 5/9: Add extraction tests, ELPA Syncer, 2024/04/03
- [elpa] externals/ellama f11b0c6896 6/9: Signal user error in ellama-context-add-selection, ELPA Syncer, 2024/04/03
- [elpa] externals/ellama 19fcbb8f98 8/9: Merge pull request #94 from r0man/context-element, ELPA Syncer, 2024/04/03
- [elpa] externals/ellama a931224a0d 9/9: Bump version, ELPA Syncer, 2024/04/03