summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-02-12 00:52:28 -0500
committerKyle Meyer <kyle@kyleam.com>2014-02-12 00:52:28 -0500
commit3fd373e35aa56ec0034d7cc33d56d6bd76e423c3 (patch)
treeb7ae819b9e16361c9bae717e30303610823f073d
parentd890d0a3e1dfbde16890c0ff113a5ee31a9389c4 (diff)
downloadbog-3fd373e35aa56ec0034d7cc33d56d6bd76e423c3.tar.gz
TST: Remove use of obsolete `flet` in tests
-rw-r--r--bog-tests.el12
-rw-r--r--bog-todo.org6
2 files changed, 11 insertions, 7 deletions
diff --git a/bog-tests.el b/bog-tests.el
index 822238a..b6d8ef0 100644
--- a/bog-tests.el
+++ b/bog-tests.el
@@ -111,26 +111,26 @@
;; `bog-citekey-action'
(ert-deftest bog-citekey-action-on-heading ()
- (let ((citekey "name2010word"))
+ (let ((citekey "name2010word")
+ (action '(lambda (ck) ck)))
(with-temp-buffer
(insert (format "\n* top level\n\n** %s\n\nsome text\n"
citekey))
(org-mode)
(show-all)
(re-search-backward bog-citekey-format)
- (flet ((funcall (action citekey) citekey))
- (should (equal (bog-citekey-action nil nil nil) citekey))))))
+ (should (equal (bog-citekey-action action nil nil) citekey)))))
(ert-deftest bog-citekey-action-on-in-text-citekey ()
- (let ((citekey "name2010word"))
+ (let ((citekey "name2010word")
+ (action '(lambda (ck) ck)))
(with-temp-buffer
(insert (format "\n* top level\n\n** other2000key\n\nsome text and %s\n"
citekey))
(org-mode)
(show-all)
(re-search-backward bog-citekey-format)
- (flet ((funcall (action citekey) citekey))
- (should (equal (bog-citekey-action nil nil nil) citekey))))))
+ (should (equal (bog-citekey-action action nil nil) citekey)))))
(ert-deftest bog-citekey-action-no-citekey ()
(with-temp-buffer
diff --git a/bog-todo.org b/bog-todo.org
index 6e20aed..84612c3 100644
--- a/bog-todo.org
+++ b/bog-todo.org
@@ -75,4 +75,8 @@ paths, which is inconvenient if using default completing read function.
** ENH Ability to run tests from makefile
-** ENH Switch from obsolete `flet' to `noflet'
+** CANCELED Switch from obsolete `flet' to `noflet'
+ CLOSED: [2014-02-12 Wed 00:50]
+ - State "CANCELED" from "ENH" [2014-02-12 Wed 00:50] \\
+ Removed `flet`, but with set up of `bog-citekey-action', a replacement
+ funciton can be passed instead of using `noflet`.