emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/paredit 1045e15 117/224: Add trivial tests for `paredit-op


From: ELPA Syncer
Subject: [nongnu] elpa/paredit 1045e15 117/224: Add trivial tests for `paredit-open-...' with prefix arguments.
Date: Sat, 7 Aug 2021 09:22:31 -0400 (EDT)

branch: elpa/paredit
commit 1045e150a69bd423514bbfbd93d51fb42deb8ef3
Author: Taylor R Campbell <campbell@mumble.net>
Commit: Taylor R Campbell <campbell@mumble.net>

    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 ?\{ ?\})



reply via email to

[Prev in Thread] Current Thread [Next in Thread]