Coverage report: /home/ellis/comp/core/lib/organ/tests.lisp
Kind | Covered | All | % |
expression | 18 | 35 | 51.4 |
branch | 3 | 6 | 50.0 |
Key
Not instrumented
Conditionalized out
Executed
Not executed
Both branches taken
One branch taken
Neither branch taken
1
(defpackage :organ/tests
2
(:use :cl :organ :std :rt :rt/fuzz)
3
(:export *test-org-file*))
5
(in-package :organ/tests)
8
(defclass org-fuzzer (fuzzer) ()
16
(random-elt (append org-element-objects org-element-types))))))))
18
(defparameter *test-org-heading*
19
#"* TODO [#A] header1 :tag1:tag2:
26
(defparameter *test-org-section*
27
"Paragraph with /italics/ *bold* =verbatim= ~code~ _underline_ +strike-through+.
30
(print \"hello world\")
33
(defparameter *test-org-lines*
46
(deftest org-markup ()
47
"Test org markup in a paragraph."
48
(let ((lines (read-org-lines-from-string *test-org-lines*)))
49
(is (org-parse :plain-text (aref lines 0)))
50
(is (org-parse :italic (aref lines 1)))
51
(is (org-parse :bold (aref lines 2)))
52
(is (org-parse :verbatim (aref lines 3)))
53
(is (org-parse :code (aref lines 4)))
54
(is (org-parse :underline (aref lines 5)))
55
(is (org-parse :strike-through (aref lines 6))))
56
;; should return vector of ORG-OBJECTs
57
(is (typep (org-contents (org-parse :paragraph *test-org-lines*)) 'vector)))
59
(deftest org-minimal ())
61
(deftest org-standard ())
63
(defun headline-ok (hl)
66
(> (organ::hl-stars hl) 0)
68
(organ::hl-priority hl)
70
(> (length (organ::hl-tags hl)) 0))))
73
(deftest org-headline () (is (headline-ok (org-parse :headline "** DONE [#A] testing stuff :foo:bar:"))))
76
(deftest org-heading ()
77
(is (headline-ok (org-headline (org-parse :heading *test-org-heading*)))))
79
(deftest org-section ())
81
(deftest org-document ())
84
(is (vectorp (read-org-lines-from-string *test-org-heading*))))