summaryrefslogtreecommitdiff
path: root/bog-tests.el
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-02-12 00:53:49 -0500
committerKyle Meyer <kyle@kyleam.com>2014-02-12 01:05:45 -0500
commitfab789a8758570d838dde74305fedeed106439b7 (patch)
tree09d67c1770dd465f7f18f697a49fa41716802745 /bog-tests.el
parent3fd373e35aa56ec0034d7cc33d56d6bd76e423c3 (diff)
downloadbog-fab789a8758570d838dde74305fedeed106439b7.tar.gz
BUG: Fix logic in citekey selection
`bog-citekey-action' should not try to select a citekey from the note context when ASK-FUNC returns non-nil.
Diffstat (limited to 'bog-tests.el')
-rw-r--r--bog-tests.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/bog-tests.el b/bog-tests.el
index b6d8ef0..6f64593 100644
--- a/bog-tests.el
+++ b/bog-tests.el
@@ -139,6 +139,16 @@
(show-all)
(should-error (bog-citekey-action nil nil nil))))
+(ert-deftest bog-citekey-action-askfunc ()
+ (let* ((citekey "name2010word")
+ (ask-func '(lambda () citekey))
+ (action '(lambda (ck) ck)))
+ (with-temp-buffer
+ (insert "\n* top level\n\n** second\n\n")
+ (org-mode)
+ (show-all)
+ (should (equal (bog-citekey-action action ask-func t) citekey)))))
+
;;; BibTeX functions