blob: 8176afbdc9980233ea8ffaf3bd202bcfc579719c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
(require 'oni-org)
(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"))))))
|