blob: 4d1396dcb12e5e4c2e5347f503ea0bfd5e129f1c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
--- a/tests/markdown-test.el
+++ b/tests/markdown-test.el
@@ -6756,46 +6756,6 @@ x|"
(markdown-indent-region (line-beginning-position) (line-end-position) nil)
(should (string-equal (buffer-string) " #. abc\n def\n"))))
-(ert-deftest test-markdown-ext/wiki-link-rules ()
- "Test wiki link search rules and font lock for missing pages."
- (let ((markdown-enable-wiki-links t)
- (markdown-wiki-link-fontify-missing t)
- (markdown-wiki-link-search-type '(project)))
- (progn
- (find-file (expand-file-name "wiki/root" markdown-test-dir))
- (unwind-protect
- (progn
- (markdown-mode)
- ;; search rules
- (should (string-match-p
- "/sub/foo$"
- (markdown-convert-wiki-link-to-filename "foo")))
- (should (string-equal
- (markdown-convert-wiki-link-to-filename "doesnotexist")
- "doesnotexist"))
- ;; font lock
- (markdown-test-range-has-property 1 11 'font-lock-face 'markdown-link-face)
- (markdown-test-range-has-property 14 33 'font-lock-face 'markdown-missing-link-face)
- (markdown-test-range-has-property 36 42 'font-lock-face 'markdown-link-face)
- (markdown-test-range-has-property 45 60 'font-lock-face 'markdown-missing-link-face))
- (kill-buffer)))
- (progn
- (find-file (expand-file-name "wiki/sub/foo" markdown-test-dir))
- (unwind-protect
- (progn
- (markdown-mode)
- ;; search rules
- (should (string-match-p
- "/wiki/root$"
- (markdown-convert-wiki-link-to-filename "root")))
- (should (string-equal
- (markdown-convert-wiki-link-to-filename "doesnotexist")
- "doesnotexist"))
- ;; font lock
- (markdown-test-range-has-property 1 16 'font-lock-face 'markdown-missing-link-face)
- (markdown-test-range-has-property 19 26 'font-lock-face 'markdown-link-face))
- (kill-buffer)))))
-
(ert-deftest test-markdown-ext/wiki-link-keep-match-data ()
"Test that markdown-wiki-link-p keeps expected match data.
Detail: https://github.com/jrblevin/markdown-mode/pull/590"
@@ -7185,41 +7145,6 @@ foo(bar=None)
(cl-loop for ov in (overlays-in (car bounds) (cdr bounds))
thereis (overlay-get ov 'flyspell-overlay))))
-(ert-deftest test-markdown-flyspell/check-word-p ()
- "Test for `flyspell'."
- (skip-unless (executable-find ispell-program-name))
- (markdown-test-string "aaa
-
-```
-bbb
-```
-
-ccc
-
-`ddd`
-
-eee
-
-<!-- fff -->
-
-@ref9999
-"
- (flyspell-buffer)
- (search-forward "aaa")
- (should (markdown-test-flyspell-incorrect-word-p))
- (search-forward "bbb") ;; in code block
- (should-not (markdown-test-flyspell-incorrect-word-p))
- (search-forward "ccc")
- (should (markdown-test-flyspell-incorrect-word-p))
- (search-forward "ddd") ;; in inline code
- (should-not (markdown-test-flyspell-incorrect-word-p))
- (search-forward "eee")
- (should (markdown-test-flyspell-incorrect-word-p))
- (search-forward "fff") ;; in comment
- (should-not (markdown-test-flyspell-incorrect-word-p))
- (search-forward "@ref") ;; pandoc reference
- (should-not (markdown-test-flyspell-incorrect-word-p))))
-
(ert-deftest test-markdown-flyspell/remove-overlay ()
"Test non-dictionary word in code block with `flyspell-mode'.
Details: https://github.com/jrblevin/markdown-mode/issues/311"
|