From 1f8cf90d2e3005923948af9589efb3d0dfc2cf09 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 29 Mar 2017 14:17:50 +0200 Subject: [PATCH] Add test for link search * testing/lisp/test-org.el (test-org/fuzzy-links): Add test. --- testing/lisp/test-org.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el index 3f4d5cf64..7823b6833 100644 --- a/testing/lisp/test-org.el +++ b/testing/lisp/test-org.el @@ -2218,7 +2218,8 @@ Foo Bar (org-test-with-temp-text "* [1]\n[[*%5B1%5D]]" (org-open-at-point) (bobp))) - ;; Match search strings containing newline characters. + ;; Match search strings containing newline characters, including + ;; blank lines. (should (org-test-with-temp-text-in-file "Paragraph\n\nline1\nline2\n\n" (let ((file (buffer-file-name))) @@ -2227,6 +2228,15 @@ Foo Bar (beginning-of-line) (let ((org-link-search-must-match-exact-headline nil)) (org-open-at-point)) + (looking-at-p "line1")))) + (should + (org-test-with-temp-text-in-file "Paragraph\n\nline1\n\nline2\n\n" + (let ((file (buffer-file-name))) + (goto-char (point-max)) + (insert (format "[[file:%s::line1 line2]]" file)) + (beginning-of-line) + (let ((org-link-search-must-match-exact-headline nil)) + (org-open-at-point)) (looking-at-p "line1"))))) ;;;; Link Escaping -- 2.11.4.GIT