summaryrefslogtreecommitdiff
path: root/bog-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'bog-tests.el')
-rw-r--r--bog-tests.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/bog-tests.el b/bog-tests.el
index 598dc31..0173c5f 100644
--- a/bog-tests.el
+++ b/bog-tests.el
@@ -121,7 +121,19 @@ point at the beginning of the inserted text."
(let ((citekey "hyphen-name2010word"))
(with-temp-buffer
(insert citekey)
+ ;; At beginning
(goto-char (point-min))
+ (should (equal (bog-citekey-at-point) citekey))
+ ;; On hyphen
+ (skip-chars-forward "-")
+ (should (equal (bog-citekey-at-point) citekey))
+ ;; After hyphen
+ (forward-char)
+ (should (equal (bog-citekey-at-point) citekey))
+ ;; On word
+ (skip-chars-forward "0-9")
+ ;; At year
+ (skip-chars-forward "-a-z")
(should (equal (bog-citekey-at-point) citekey)))))
;; `bog-citekey-from-tree'