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 24b5d0d..5b0cd79 100644
--- a/bog-tests.el
+++ b/bog-tests.el
@@ -157,3 +157,17 @@
(should new-buffer)
(kill-buffer new-buffer)
(delete-file new-file))))
+
+;; `bog-collect-references'
+
+(ert-deftest bog-collect-references ()
+ (with-temp-buffer
+ (insert "abc1900word\nhij2000word\nefg1800word\n")
+ (should (equal (bog-collect-references)
+ '("abc1900word" "efg1800word" "hij2000word")))))
+
+(ert-deftest bog-collect-references-no-sort ()
+ (with-temp-buffer
+ (insert "abc1900word\nhij2000word\nefg1800word\n")
+ (should (equal (bog-collect-references t)
+ '("efg1800word" "hij2000word" "abc1900word")))))