branch: elpa/org-drill
commit 0444db69f55c302a6ac0d6ee5c8558ede4d3d09a
Author: Darrell Overbay <[email protected]>
Commit: Darrell Overbay <[email protected]>
fix reversed member arguments
---
org-drill.el | 2 +-
test/one-two-three.org | 2 +-
test/org-drill-test.el | 18 +++++++++++++-----
3 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/org-drill.el b/org-drill.el
index e6743e29d1..7ff7042ef6 100644
--- a/org-drill.el
+++ b/org-drill.el
@@ -725,7 +725,7 @@ CMD is bound, or nil if it is not bound to a key."
(apply 'org-map-entries func
(concat "+" org-drill-question-tag
(if (and (stringp org-drill-match)
- (not (member '(?+ ?- ?|) (elt org-drill-match 0))))
+ (not (member (elt org-drill-match 0) '(?+ ?- ?|))))
"+" "")
(or org-drill-match ""))
(org-drill-current-scope scope)
diff --git a/test/one-two-three.org b/test/one-two-three.org
index a34f905033..c1120b66d9 100644
--- a/test/one-two-three.org
+++ b/test/one-two-three.org
@@ -1,5 +1,5 @@
-* One :drill:
+* One :drill:tagtest:
Body of One
diff --git a/test/org-drill-test.el b/test/org-drill-test.el
index 529d411ea3..eb3c527bae 100644
--- a/test/org-drill-test.el
+++ b/test/org-drill-test.el
@@ -38,8 +38,16 @@
(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-drill-map-entries (lambda () (point)) 'file nil)))))
+ (equal '(2 38 66)
+ (assess-with-find-file
+ (assess-make-related-file
+ (concat this-directory "one-two-three.org"))
+ (org-drill-map-entries (lambda () (point)) 'file nil)))))
+
+(ert-deftest find-tagged-entries ()
+ (should
+ (equal '(2)
+ (assess-with-find-file
+ (assess-make-related-file
+ (concat this-directory "one-two-three.org"))
+ (org-drill-map-entries (lambda () (point)) 'file "tagtest")))))