diff options
author | Kyle Meyer <kyle@kyleam.com> | 2014-12-11 23:45:51 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2014-12-11 23:45:51 -0500 |
commit | ce74785920d6234072eb2ebef63bd140a25534c2 (patch) | |
tree | 237e499a625028bcfb5e8fdf04477acdc56a0afa /bog-tests.el | |
parent | 06697a74f6725202b7afe67d4eec28343f365bad (diff) | |
download | bog-ce74785920d6234072eb2ebef63bd140a25534c2.tar.gz |
Add function to get citekeys in buffer
Diffstat (limited to 'bog-tests.el')
-rw-r--r-- | bog-tests.el | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/bog-tests.el b/bog-tests.el index 201bc89..c454da7 100644 --- a/bog-tests.el +++ b/bog-tests.el @@ -250,6 +250,25 @@ some text and <point><citekey>" ** second" (should-not (bog-citekey-from-surroundings)))) +(ert-deftest bog-citekeys-in-buffer () + (should (equal '("abc1900def" "ghi1950jkl" "mno2000pqr") + (bog-tests--with-temp-text + " +* abc1900def +ghi1950jkl +* mno2000pqr +* mno2000pqr" + (--sort (string-lessp it other) (bog-citekeys-in-buffer)))))) + +(ert-deftest bog-heading-citekeys-in-buffer () + (should (equal '("abc1900def" "mno2000pqr") + (bog-tests--with-temp-text + " +* abc1900def +ghi1950jkl +* mno2000pqr" + (bog-heading-citekeys-in-buffer))))) + ;; bog-{next,previous}-non-heading-citekey (ert-deftest bog-next-non-heading-citekey-default-arg () |