diff options
author | Damien Cassou | 2021-03-19 11:20:42 +0100 |
---|---|---|
committer | Damien Cassou | 2021-03-19 11:20:42 +0100 |
commit | e85f625da11dfd0bd24ad6a1dc37db80c5ca5a23 (patch) | |
tree | eb6314bfb1d3b9c73aab4cb2d2ced398e8896661 | |
parent | e4b35b34e82f264e98a72409c643d842e75fc586 (diff) | |
download | nroam-e85f625da11dfd0bd24ad6a1dc37db80c5ca5a23.tar.gz nroam-e85f625da11dfd0bd24ad6a1dc37db80c5ca5a23.zip |
nroam-test.el: Extract constant
* tests/nroam-test.el (nroam-test-main-section-regexp): New constant.
-rw-r--r-- | tests/nroam-test.el | 4 |
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)))))) |