1
0
Fork 0
emacs-config/test/oni-org-test.el

19 lines
846 B
EmacsLisp
Raw Normal View History

(ert-deftest oni-org-test-color-for ()
"Test that oni-org-color-for returns a hex color name."
(should (string= "#acbd18" (oni-org-color-for "foo"))))
(ert-deftest oni-org-test-generate-todo-keyword-faces ()
"Test that oni-org-generate-todo-keyword-faces returns a list of colors."
(let ((org-todo-keywords-1 '("foo" "bar")))
(should (equal (oni-org-generate-todo-keyword-faces)
'(("foo" . "#acbd18")
("bar" . "#37b51d"))))))
(ert-deftest oni-org-test-generate-tag-faces ()
"Test that oni-org-generate-tag-faces returns a list of colors."
(cl-letf (((symbol-function 'org-get-buffer-tags)
(lambda () '(("foo") ("bar")))))
(should (equal (oni-org-generate-tag-faces)
'(("foo" . "#acbd18")
("bar" . "#37b51d"))))))