From 1045e150a69bd423514bbfbd93d51fb42deb8ef3 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Sat, 9 Apr 2011 19:38:01 +0000 Subject: Add trivial tests for `paredit-open-...' with prefix arguments. Ignore-this: fe896b5633ffd3c34448b69b4ad149ea darcs-hash:20110409193801-00fcc-6fa903a5a00ced144e483b5fcd36e11e2c88e088 --- test.el | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) 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 ?\{ ?\}) -- cgit v1.2.1