summaryrefslogtreecommitdiff
path: root/bog-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'bog-tests.el')
-rw-r--r--bog-tests.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/bog-tests.el b/bog-tests.el
index 506cd27..f83c3af 100644
--- a/bog-tests.el
+++ b/bog-tests.el
@@ -1,5 +1,6 @@
(require 'ert)
(require 'org)
+(require 'dash)
(require 'bog)
;; Modified from magit-tests.el.
@@ -169,6 +170,19 @@
(should-not (file-exists-p (expand-file-name
(concat "one.pdf") bog-pdf-directory))))))
+(ert-deftest bog-pdf-citekeys-multiple-variants ()
+ (bog-tests--with-temp-dir
+ (let* ((bog-pdf-directory (expand-file-name "pdfs"))
+ (citekey "name2010word")
+ (variants (--map (concat citekey it ".pdf")
+ '("" "_0" "-supplement")))
+ found-files)
+ (make-directory bog-pdf-directory)
+ (--each variants
+ (write-region "" nil (expand-file-name it bog-pdf-directory)))
+ (setq files-found (bog-citekey-pdfs citekey))
+ (should (= (length files-found) 3)))))
+
;;; BibTeX functions