From e85f625da11dfd0bd24ad6a1dc37db80c5ca5a23 Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Fri, 19 Mar 2021 11:20:42 +0100 Subject: nroam-test.el: Extract constant * tests/nroam-test.el (nroam-test-main-section-regexp): New constant. --- tests/nroam-test.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/nroam-test.el') 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)))))) -- cgit v1.2.3-54-g00ecf