emacs-elpa-diffs
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]