[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]]
- [nongnu] elpa/markdown-mode updated (7360efc -> c3c2f0d), ELPA Syncer, 2021/10/21
- [nongnu] elpa/markdown-mode d917e71 1/8: extend markdown-do to follow links, ELPA Syncer, 2021/10/21
- [nongnu] elpa/markdown-mode fc729ea 2/8: WIP: fix+add tests for markdown-do link jump, ELPA Syncer, 2021/10/21
- [nongnu] elpa/markdown-mode 799a8e9 3/8: Fix tests, ELPA Syncer, 2021/10/21
- [nongnu] elpa/markdown-mode 0a9ee2b 4/8: Update Changes, ELPA Syncer, 2021/10/21
- [nongnu] elpa/markdown-mode 1c459f7 7/8: Merge pull request #667 from jrblevin/markdown-do-follow-links, ELPA Syncer, 2021/10/21
- [nongnu] elpa/markdown-mode 981e48c 5/8: Test following wiki link to nonexistent file works,
ELPA Syncer <=
- [nongnu] elpa/markdown-mode bf7c4d8 6/8: Update CHANGES.md, ELPA Syncer, 2021/10/21
- [nongnu] elpa/markdown-mode c3c2f0d 8/8: Merge pull request #668 from edrex/test-wiki-link-follow-new-file, ELPA Syncer, 2021/10/21