summaryrefslogtreecommitdiffstatshomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Damien Cassou2021-03-19 11:20:42 +0100
committerGravatar Damien Cassou2021-03-19 11:20:42 +0100
commite85f625da11dfd0bd24ad6a1dc37db80c5ca5a23 (patch)
treeeb6314bfb1d3b9c73aab4cb2d2ced398e8896661 /tests
parente4b35b34e82f264e98a72409c643d842e75fc586 (diff)
downloadnroam-e85f625da11dfd0bd24ad6a1dc37db80c5ca5a23.tar.gz
nroam-e85f625da11dfd0bd24ad6a1dc37db80c5ca5a23.zip
nroam-test.el: Extract constant
* tests/nroam-test.el (nroam-test-main-section-regexp): New constant.
Diffstat (limited to 'tests')
-rw-r--r--tests/nroam-test.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/nroam-test.el b/tests/nroam-test.el
index f75a7bb..7db8f75 100644
--- a/tests/nroam-test.el
+++ b/tests/nroam-test.el
@@ -39,6 +39,8 @@ Execute BODY and cleanup the file and buffer after that."
(nroam-test-with-temp-file-buffer (insert "foo"))
+(defconst nroam-test-main-section-regexp "^* Backlinks")
+
(describe "nroam"
(describe "nroam-mode"
(it "creates nroam sections immediately"
@@ -46,7 +48,7 @@ Execute BODY and cleanup the file and buffer after that."
(insert "#+title: my notes\n")
(nroam-mode)
(setf (point) (point-min))
- (let ((section-position (re-search-forward "^* Backlinks" nil t)))
+ (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))))))