2020-01-14 08:17:38 +01:00
|
|
|
|
(require 'oni-org)
|
|
|
|
|
|
2020-01-14 07:51:39 +01:00
|
|
|
|
(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"))))))
|