summaryrefslogtreecommitdiff
path: root/bog-tests.el
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-03-14 00:36:01 -0400
committerKyle Meyer <kyle@kyleam.com>2014-03-14 01:04:50 -0400
commitb08b66f33ea11c9d6218cd26f7a636d972a7b0f2 (patch)
tree289501d7451439fc3d217b405fc369194b6ed3cb /bog-tests.el
parentbe0c58a1dcdf78b636b1115b0bf4e867d289c222 (diff)
downloadbog-b08b66f33ea11c9d6218cd26f7a636d972a7b0f2.tar.gz
ENH: Allow customization of PDF file separator
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