branch: elpa/paredit
commit 621be23657294eec26dc54bc3c4b5217154da0a0
Author: Taylor R Campbell <[email protected]>
Commit: Taylor R Campbell <[email protected]>
Add some tests for recent changes to deletion and killing commands.
Ignore-this: faf1edd6c7cd277cf4fdaa1eff18985c
darcs-hash:20110411180930-00fcc-1d348dfc4d09757c3d608742df27c5a2b95d01fd
---
test.el | 20 +++++++++++++++-----
1 file 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...