branch: elpa/org-drill
commit 500d1475c3fe3fdb15b8bb015ca2f9487b13b4f9
Author: Phillip Lord <[email protected]>
Commit: Phillip Lord <[email protected]>
Add count entries test
---
test/one-two-three.org | 12 ++++++++++++
test/org-drill-test.el | 13 +++++++++++++
2 files changed, 25 insertions(+)
diff --git a/test/one-two-three.org b/test/one-two-three.org
new file mode 100644
index 0000000000..a34f905033
--- /dev/null
+++ b/test/one-two-three.org
@@ -0,0 +1,12 @@
+
+* One :drill:
+
+Body of One
+
+* Two :drill:
+
+Body of Two
+
+* Three :drill:
+
+Body of Three
diff --git a/test/org-drill-test.el b/test/org-drill-test.el
index 8f5b7e7445..26e60c0aa4 100644
--- a/test/org-drill-test.el
+++ b/test/org-drill-test.el
@@ -26,7 +26,20 @@
;;; Code:
+(require 'assess)
(require 'org-drill)
+(defvar this-directory
+ (file-name-directory
+ (or load-file-name (buffer-file-name))))
+
(ert-deftest load-test ()
(should t))
+
+(ert-deftest find-entries ()
+ (should
+ (equal '(2 30 58)
+ (assess-with-find-file
+ (assess-make-related-file
+ (concat this-directory "one-two-three.org"))
+ (org-map-drill-entries (lambda () (point)) 'file nil)))))