Browse Source

Add test for link search

* testing/lisp/test-org.el (test-org/fuzzy-links): Add test.
Nicolas Goaziou 8 năm trước cách đây
mục cha
commit
1f8cf90d2e
1 tập tin đã thay đổi với 11 bổ sung1 xóa
  1. 11 1
      testing/lisp/test-org.el

+ 11 - 1
testing/lisp/test-org.el

@@ -2218,9 +2218,19 @@ Foo Bar
    (org-test-with-temp-text "* [1]\n[[*%5B1%5D<point>]]"
      (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)))
+       (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"))))
+  (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))