aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhillip Lord <phillip.lord@russet.org.uk>2019-06-08 16:53:11 +0100
committerPhillip Lord <phillip.lord@russet.org.uk>2019-06-08 16:53:11 +0100
commit500d1475c3fe3fdb15b8bb015ca2f9487b13b4f9 (patch)
tree816c88e0ad97d8a6cf947ef4dc3101ebcecce7b2
parentdf13d89a4c06aa8e3ed7096dcf576e171fd37042 (diff)
downloadorg-drill-500d1475c3fe3fdb15b8bb015ca2f9487b13b4f9.tar.gz
org-drill-500d1475c3fe3fdb15b8bb015ca2f9487b13b4f9.zip
Add count entries test
-rw-r--r--test/one-two-three.org12
-rw-r--r--test/org-drill-test.el13
2 files changed, 25 insertions, 0 deletions
diff --git a/test/one-two-three.org b/test/one-two-three.org
new file mode 100644
index 0000000..a34f905
--- /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 8f5b7e7..26e60c0 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)))))