summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaylor R Campbell <campbell@mumble.net>2011-04-11 18:09:30 +0000
committerTaylor R Campbell <campbell@mumble.net>2011-04-11 18:09:30 +0000
commit621be23657294eec26dc54bc3c4b5217154da0a0 (patch)
treeaad53d688243a292cc08e7e8c85b04066b3bbfa8
parentadfccc519e17f3e7a3596fe20480398d9ea0956a (diff)
Add some tests for recent changes to deletion and killing commands.
Ignore-this: faf1edd6c7cd277cf4fdaa1eff18985c darcs-hash:20110411180930-00fcc-1d348dfc4d09757c3d608742df27c5a2b95d01fd
-rw-r--r--test.el20
1 files changed, 15 insertions, 5 deletions
diff --git a/test.el b/test.el
index e625175..1c4d957 100644
--- a/test.el
+++ b/test.el
@@ -193,7 +193,7 @@ Four arguments: the paredit command, the text of the buffer
;; `comment-search-forward' to wind up inside a character or a
;; string?
))
-
+
(paredit-test 'paredit-forward-delete
'(("f|oo" "f|o")
(";f|(oo" ";f|oo")
@@ -202,7 +202,10 @@ Four arguments: the paredit command, the text of the buffer
(";foo|\n(bar)\n(baz\n quux)" ";foo|(bar)\n(baz\n quux)")
(";foo|\n(bar\n baz)" error)
("|;;foo(" "|;foo(" error)
- ))
+ (";foo|\n(bar);baz\n" ";foo|(bar);baz\n")
+ (";foo|\n(bar);baz" ";foo|(bar);baz")
+ (";foo|\n(bar ;baz\n quux)\n" error)
+ (";foo|\n(bar ;baz\n quux)" error)))
(paredit-test 'paredit-backward-delete
'(("fo|o" "f|o")
@@ -212,7 +215,16 @@ Four arguments: the paredit command, the text of the buffer
(";foo\n|(bar)\n(baz\n quux)" ";foo|(bar)\n(baz\n quux)")
(";foo\n|(bar\n baz)" error)
(";;|foo(" ";|foo(" error)
- ))
+ (";foo\n|(bar);baz\n" ";foo|(bar);baz\n")
+ (";foo\n|(bar);baz" ";foo|(bar);baz")
+ (";foo\n|(bar ;baz\n quux)\n" error)
+ (";foo\n|(bar ;baz\n quux)" error)))
+
+;++ Need lots more tests for this, the hairiest paredit command...
+
+(paredit-test 'paredit-kill
+ '((";foo|\n(bar)\n" ";foo|(bar)\n")
+ (";foo|\n(bar\n baz)\n" error)))
(defun paredit-canary-indent-method (state indent-point normal-indent)
(check-parens)
@@ -230,5 +242,3 @@ Four arguments: the paredit command, the text of the buffer
(paredit-test 'paredit-forward-barf-sexp
'(("(paredit-canary| ;\n (lose))")
("(paredit-canary| ;\n)\n(lose)")))
-
-;++ Killing commands...ugh...