summaryrefslogtreecommitdiff
path: root/test.el
diff options
context:
space:
mode:
authorTaylor R Campbell <campbell@mumble.net>2011-04-09 19:38:01 +0000
committerTaylor R Campbell <campbell@mumble.net>2011-04-09 19:38:01 +0000
commit1045e150a69bd423514bbfbd93d51fb42deb8ef3 (patch)
tree444ff576e3fde9f69d22dade441b460947edb354 /test.el
parent620c3a2ca1686fbec7d8ebfde4333fece927d8cd (diff)
Add trivial tests for `paredit-open-...' with prefix arguments.
Ignore-this: fe896b5633ffd3c34448b69b4ad149ea darcs-hash:20110409193801-00fcc-6fa903a5a00ced144e483b5fcd36e11e2c88e088
Diffstat (limited to 'test.el')
-rw-r--r--test.el23
1 files changed, 22 insertions, 1 deletions
diff --git a/test.el b/test.el
index cfbe678..62f8f61 100644
--- a/test.el
+++ b/test.el
@@ -80,7 +80,6 @@ Four arguments: the paredit command, the text of the buffer
examples)))))
;++ Test `paredit-open-...' with the region active.
-;++ Test `paredit-open-...' with prefix arguments.
(paredit-test-bracketed '((paredit-open-round ?\( ?\))
(paredit-open-square ?\[ ?\])
@@ -98,6 +97,28 @@ Four arguments: the paredit command, the text of the buffer
("foo|" "foo (|)")
("|foo" "(|) foo")))
+(let ((current-prefix-arg 1))
+ (paredit-test-bracketed '((paredit-open-round ?\( ?\))
+ (paredit-open-square ?\[ ?\])
+ (paredit-open-curly ?\{ ?\})
+ ;; (paredit-open-angled ?\< ?\>)
+ )
+ '(("(foo |bar baz)" "(foo (|bar) baz)")
+ ("(x |;y\n z\n w)"
+ "(x (| ;y\n z)\n w)"))))
+
+(let ((current-prefix-arg '(4)))
+ (paredit-test-bracketed '((paredit-open-round ?\( ?\))
+ (paredit-open-square ?\[ ?\])
+ (paredit-open-curly ?\{ ?\})
+ ;; (paredit-open-angled ?\< ?\>)
+ )
+ '(("(foo |bar baz)" "(foo (|bar baz))")
+ ("(x |;y\n z\n w)"
+ "(x (| ;y\n z\n w))")
+ ("foo |bar baz" "foo (|bar baz)")
+ ("foo\n|bar\nbaz\n;quux\n" "foo\n(|bar\n baz)\n;quux\n"))))
+
(paredit-test-bracketed '((paredit-close-round ?\( ?\))
(paredit-close-square ?\[ ?\])
(paredit-close-curly ?\{ ?\})