emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/markdown-mode 981e48c 5/8: Test following wiki link to non


From: ELPA Syncer
Subject: [nongnu] elpa/markdown-mode 981e48c 5/8: Test following wiki link to nonexistent file works
Date: Thu, 21 Oct 2021 20:57:51 -0400 (EDT)

branch: elpa/markdown-mode
commit 981e48c40498502def057250859403605546547f
Author: Eric Drechsel <eric@pdxhub.org>
Commit: Eric Drechsel <eric@pdxhub.org>

    Test following wiki link to nonexistent file works
---
 tests/markdown-test.el | 12 ++++++++++++
 tests/wiki/foo.md      |  1 +
 2 files changed, 13 insertions(+)

diff --git a/tests/markdown-test.el b/tests/markdown-test.el
index 67cf3a1..bc5fa5c 100644
--- a/tests/markdown-test.el
+++ b/tests/markdown-test.el
@@ -6572,6 +6572,18 @@ Detail: 
https://github.com/jrblevin/markdown-mode/pull/590";
           (should (eq major-mode 'gfm-mode)))
       (kill-buffer))))
 
+(ert-deftest test-markdown-ext/wiki-link-nonexistent-file ()
+  "Test following wiki link to nonexistent file visits the buffer."
+  (let ((markdown-enable-wiki-links t))
+    (find-file (expand-file-name "wiki/foo.md" markdown-test-dir))
+    (unwind-protect
+        (progn
+          (markdown-mode)
+          (search-forward "[[doesnotexist]]")
+          (markdown-follow-wiki-link-at-point)
+          (should (string= (buffer-name) "doesnotexist.md")))
+      (kill-buffer))))
+
 (defadvice markdown-live-preview-window-eww
     (around markdown-test-create-fake-eww disable)
   (setq ad-return-value (get-buffer-create "*eww*")))
diff --git a/tests/wiki/foo.md b/tests/wiki/foo.md
new file mode 100644
index 0000000..cef18a9
--- /dev/null
+++ b/tests/wiki/foo.md
@@ -0,0 +1 @@
+[[doesnotexist]]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]