summaryrefslogtreecommitdiff
path: root/test.el
diff options
context:
space:
mode:
authorTaylor R Campbell <campbell@mumble.net>2011-04-11 23:00:18 +0000
committerTaylor R Campbell <campbell@mumble.net>2011-04-11 23:00:18 +0000
commit239e065218996f7f8ac077d7743e6c3b2d5199ef (patch)
tree4c7d491f2e006cc720f36370605443080df757ed /test.el
parenteb138b57dc6004392352b73320cb3e84ab7ba262 (diff)
Expand `paredit-kill' tests a little.
Ignore-this: 24b37ef662a653c2dfc7c6bb81e9f493 Still a long way from being remotely satisfactory. darcs-hash:20110411230018-00fcc-df5e070b386a549fce8ddb38db6aa27983e70893
Diffstat (limited to 'test.el')
-rw-r--r--test.el53
1 files changed, 47 insertions, 6 deletions
diff --git a/test.el b/test.el
index ad33488..c237418 100644
--- a/test.el
+++ b/test.el
@@ -240,12 +240,6 @@ Four arguments: the paredit command, the text of the buffer
(";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)))
-
(dolist (command '(paredit-delete-region paredit-kill-region))
;++ Need to check whether `paredit-kill-region' updates the kill ring
;++ correctly.
@@ -265,6 +259,53 @@ Four arguments: the paredit command, the text of the buffer
("(foo bar| baz ;quux ()_\n zot)"
"(foo bar|\n zot)"))))
+;;; The hairiest paredit command: paredit-kill.
+
+;++ Need to check whether `paredit-kill' updates the kill ring.
+
+(paredit-test 'paredit-kill
+ '(("| \n " "|\n " "| " "|" error)
+ ("(| )" "(|)" "(|)")
+ ("( | )" "( |)" "( |)")
+ ("|(\n)" "|" error)
+ ("|(\n)\n" "|\n" "|" error)
+ ("|\"\n\"" "|" error)
+ ("|\"\n\"\n" "|\n" "|" error)
+ ("(a |(b) (c)\n (d) (e))"
+ "(a |\n (d) (e))"
+ "(a | (d) (e))"
+ "(a |)"
+ "(a |)")
+ ("(a (|(b) (c)\n (d) (e)) (f))"
+ "(a (|\n (d) (e)) (f))"
+ "(a (| (d) (e)) (f))"
+ "(a (|) (f))"
+ "(a (|) (f))")
+ ("(a |((b) (c)\n (d) (e)) (f))"
+ "(a | (f))"
+ "(a |)"
+ "(a |)")
+ ("(a |\"(b) (c)\n ) { ;;;; \n\n\n(d)( (e);\" (f))"
+ "(a | (f))"
+ "(a |)"
+ "(a |)")
+ ("x|(\n)(z)" "x|(z)" "x|" error)
+ ("x|\"\n\"(z)" "x|(z)" "x|" error)
+ ("(foo ;; |bar\n baz)"
+ "(foo ;; |\n baz)"
+ error)
+ ("(foo |;; bar\n baz)"
+ "(foo |\n baz)"
+ "(foo | baz)"
+ "(foo |)"
+ "(foo |)")
+ ("|(foo bar) ;baz" "|" error)
+ ("|(foo bar) ;baz\n" "|\n" "|" error)
+ ("|(foo\n bar) ;baz" "| ;baz" "|" error)
+ ("|(foo\n bar) ;baz\n" "| ;baz\n" "|\n" "|" error)
+ (";foo|\n(bar)\n" ";foo|(bar)\n" ";foo|\n" ";foo|" error)
+ (";foo|\n(bar\n baz)\n" error)))
+
(defun paredit-canary-indent-method (state indent-point normal-indent)
(check-parens)
nil)