From 6ed075041403b8abb7672d258dcb12600d20880e Mon Sep 17 00:00:00 2001 From: Evgeni Kolev Date: Sun, 10 Sep 2017 08:05:46 +0300 Subject: Add examples from readme as automated tests --- test/evil-surround-test.el | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/test/evil-surround-test.el b/test/evil-surround-test.el index bbfe45a..240ec7a 100644 --- a/test/evil-surround-test.el +++ b/test/evil-surround-test.el @@ -14,4 +14,28 @@ ("csb'") "one 'two' three" ("ds'") - "one two three"))) + "one two three")) + (ert-info ("examples from readme") + (evil-test-buffer + :visual-start nil + :visual-end nil + "\"Hello world!\"" + (turn-on-evil-surround-mode) + ("cs\"'") + "'Hello world!'" + ("cs'") + "Hello world!" + ("cst\"") + "\"Hello world!\"" + ("ds\"") + "Hello world!" + ("ysiw]") + "[Hello] world!" + ("cs[{") + "{ Hello } world!" + ("yssb") + "({ Hello } world!)" + ("lds{ds)") ;; 'l' to move the cursor right, inside brackets + "Hello world!" + ("ysiw") + "Hello world!"))) -- cgit v1.0 From 5ea0a9ae5aa078b54f8a3f9e703639ee2f7b50e4 Mon Sep 17 00:00:00 2001 From: Evgeni Kolev Date: Sun, 10 Sep 2017 09:11:16 +0300 Subject: Remove debug messages --- evil-surround.el | 2 -- 1 file changed, 2 deletions(-) diff --git a/evil-surround.el b/evil-surround.el index 7bdb986..bfe6056 100644 --- a/evil-surround.el +++ b/evil-surround.el @@ -258,7 +258,6 @@ If OPERATION is `change', call `evil-surround-change'. if OPERATION is `delete', call `evil-surround-delete'. Otherwise call `evil-surround-region'." (interactive (evil-surround-interactive-setup)) - (message "%s" operation) (cond ((eq operation 'change) (call-interactively 'evil-surround-change)) @@ -273,7 +272,6 @@ Otherwise call `evil-surround-region'." It does nothing for change / delete." (interactive (evil-surround-interactive-setup)) - (message "%s" operation) (cond ((eq operation 'change) nil) ((eq operation 'delete) nil) -- cgit v1.0