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

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

[nongnu] elpa/markdown-mode ec15e37 6/8: Add tests about inserting folda


From: ELPA Syncer
Subject: [nongnu] elpa/markdown-mode ec15e37 6/8: Add tests about inserting foldable block
Date: Wed, 10 Feb 2021 01:57:12 -0500 (EST)

branch: elpa/markdown-mode
commit ec15e37f0ce83a7b41d2d5318e45a3f613197251
Author: Shohei YOSHIDA <syohex@gmail.com>
Commit: Shohei YOSHIDA <syohex@gmail.com>

    Add tests about inserting foldable block
---
 tests/markdown-test.el | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/tests/markdown-test.el b/tests/markdown-test.el
index e32ebb6..cba9b61 100644
--- a/tests/markdown-test.el
+++ b/tests/markdown-test.el
@@ -1324,6 +1324,21 @@ Detail: https://github.com/jrblevin/markdown-mode/issues";
       (execute-kbd-macro (read-kbd-macro "M-x markdown-insert-link RET RET RET 
RET"))
       (should (string-equal (buffer-string) "[GNU](https://www.gnu.org/)")))))
 
+(ert-deftest test-markdown-insertion/foldable-block ()
+  "Test `markdown-insert-foldable-block'."
+  (markdown-test-string ""
+    (call-interactively 'markdown-insert-foldable-block)
+    (should (string= (buffer-string) "<details>\n<summary> 
</summary>\n</details>"))
+    (should (looking-back "<summary>")))
+
+  (markdown-test-string "foo"
+    (push-mark (point) t t)
+    (end-of-line)
+    (should (use-region-p))
+    (call-interactively 'markdown-insert-foldable-block)
+    (should (string= (buffer-string) "<details>\n<summary> 
</summary>\nfoo\n</details>"))
+    (should (looking-back "<summary>"))))
+
 ;;; Footnote tests:
 
 (ert-deftest test-markdown-footnote/basic-end ()



reply via email to

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