summaryrefslogtreecommitdiffstatshomepage
path: root/tests/nroam-test.el
diff options
context:
space:
mode:
authorGravatar Damien Cassou2021-03-19 11:21:37 +0100
committerGravatar Damien Cassou2021-03-19 11:21:37 +0100
commitd7de243272f3f2bf7177ad81c5137b4ad97c15dd (patch)
tree894fae73bd2078b5a719a85702f11d2012ebf6e8 /tests/nroam-test.el
parente85f625da11dfd0bd24ad6a1dc37db80c5ca5a23 (diff)
downloadnroam-d7de243272f3f2bf7177ad81c5137b4ad97c15dd.tar.gz
nroam-d7de243272f3f2bf7177ad81c5137b4ad97c15dd.zip
Add nroam-goto
* nroam.el (nroam-goto): New function. * tests/nroam-test.el: New test for the function.
Diffstat (limited to 'tests/nroam-test.el')
-rw-r--r--tests/nroam-test.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/nroam-test.el b/tests/nroam-test.el
index 7db8f75..c9a8a05 100644
--- a/tests/nroam-test.el
+++ b/tests/nroam-test.el
@@ -50,7 +50,15 @@ Execute BODY and cleanup the file and buffer after that."
(setf (point) (point-min))
(let ((section-position (re-search-forward nroam-test-main-section-regexp nil t)))
(expect section-position :not :to-be nil)
- (expect section-position :to-be-greater-than 10))))))
+ (expect section-position :to-be-greater-than 10)))))
+ (describe "nroam-goto"
+ (it "moves point if nroam heading is present"
+ (nroam-test-with-temp-file-buffer
+ (insert "nroam is great\n")
+ (nroam-update)
+ (setf (point) (point-min))
+ (nroam-goto)
+ (expect (looking-at-p nroam-test-main-section-regexp) :to-be t)))))
(provide 'nroam-test)
;;; nroam-test.el ends here