[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-nerd-commenter 72d4aacd28 187/235: more unit test
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-nerd-commenter 72d4aacd28 187/235: more unit test |
Date: |
Thu, 6 Jan 2022 02:59:46 -0500 (EST) |
branch: elpa/evil-nerd-commenter
commit 72d4aacd2852df5c1e27280426b9bbff24e7a370
Author: Chen Bin <chenbin.sh@gmail.com>
Commit: Chen Bin <chenbin.sh@gmail.com>
more unit test
---
evil-nerd-commenter-tests.el | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/evil-nerd-commenter-tests.el b/evil-nerd-commenter-tests.el
index d83b64f6a6..c6f301c7c8 100644
--- a/evil-nerd-commenter-tests.el
+++ b/evil-nerd-commenter-tests.el
@@ -72,10 +72,33 @@
(js-mode)
(goto-char (point-min))
(evilnc-copy-and-comment-lines 2)
+ (should (not (evilnc-is-pure-comment (point))))
(setq lines (evilnc-get-lines (point-min) (point-max)))
(should (string= (nth 0 lines) "// hello"))
(should (string= (nth 1 lines) "// world"))
(should (string= (nth 2 lines) "hello"))
(should (string= (nth 3 lines) "world")))))
+(ert-deftest evilnc-test-comment-html-tag ()
+ (let* (lines)
+ (with-temp-buffer
+ (insert "<div class=\"box\">\nhello world\n</div>")
+ (html-mode)
+ ;; comment tag
+ (goto-char (point-min))
+ (evilnc-comment-or-uncomment-html-tag)
+ (setq lines (evilnc-get-lines (point-min) (point-max)))
+ (should (string= (nth 0 lines) "{/* <div class=\"box\">"))
+ (should (string= (nth 1 lines) "hello world"))
+ (should (string= (nth 2 lines) "</div> */}"))
+ ;; move the cursor to the middle of html tag
+ (goto-line 2)
+ ;; uncomment whole tag
+ (evilnc-comment-or-uncomment-html-tag)
+ (setq lines (evilnc-get-lines (point-min) (point-max)))
+ (should (string= (nth 0 lines) "<div class=\"box\">"))
+ (should (string= (nth 1 lines) "hello world"))
+ (should (string= (nth 2 lines) "</div>"))
+ )))
+
(ert-run-tests-batch-and-exit)
- [nongnu] elpa/evil-nerd-commenter bb47704a10 155/235: Do not byte-compile evil-nerd-commenter-operator.el, (continued)
- [nongnu] elpa/evil-nerd-commenter bb47704a10 155/235: Do not byte-compile evil-nerd-commenter-operator.el, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 76fd0c5692 160/235: go to original column after copy and comment, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter a32e12d16d 166/235: add evilnc-imenu-create-index-function, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 41d4370921 165/235: Fixed: missing one char when comment end is (point-max), ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 912a967fe5 167/235: avoid duplicates in imenu comments, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 275c95c89c 172/235: Merge pull request #88 from mssdvd/master, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter c68ad3346f 170/235: Add an option to not define keybindings in Emacs mode, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 8089308aad 181/235: Merge pull request #94 from leungbk/vertical-motion, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 3089141dd2 183/235: Merge pull request #95 from leungbk/forward-line, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 3cf6b1e746 174/235: can comment or uncomment jsx tag(s), ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 72d4aacd28 187/235: more unit test,
ELPA Syncer <=
- [nongnu] elpa/evil-nerd-commenter 5cf8755264 191/235: clean code. more unit test. bump 3.3.6, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter f510a491c1 195/235: support js2-rjsx-mode, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 9c87ea30fa 199/235: wording, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter ce3530406c 201/235: fixed CI, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter a5555ff02a 202/235: remove legacy code on old version of web-mode, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter d664ad5af7 203/235: clean code, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter c9fa23ee7e 206/235: evil operator try to comment on whole lines if possible, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter fd2fba722e 205/235: clean keybinding setup code, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 4a72fbd022 207/235: README, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-nerd-commenter 76f07963c0 213/235: Update outdated link to emacswiki, ELPA Syncer, 2022/01/06