From 6f2677b1a97e4d0a6e0e823eed9cd714ba700266 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Sun, 8 May 2011 17:56:37 +0000 Subject: Tweak `paredit-convolute-sexp' a little and add some tests for it. Ignore-this: 61dbcae678e46499873949c68cc78fbf Thanks to Leo Liu for the nudge about some of its rough corners (and for pointing out the screw case recently fixed). It's still pretty rough around the edges. darcs-hash:20110508175637-00fcc-265b11688b79f4d01211d798fec7e9dd3fe4748f --- test.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'test.el') diff --git a/test.el b/test.el index 4d83010..3bb389a 100644 --- a/test.el +++ b/test.el @@ -359,4 +359,12 @@ Four arguments: the paredit command, the text of the buffer ("(paredit-canary| ;\n)\n(lose)"))) (paredit-test 'paredit-convolute-sexp - '(("(let ((x 5) (y 3)) |(frob (zwonk)) (wibblethwop))" error))) + '(("(let ((x 5) (y 3)) |(frob (zwonk)) (wibblethwop))" error) + ("(let ((x 0)) (progn| x))" "(progn |(let ((x 0)) x))") + ;; Should the space be left inside the LET? In both cases? + ("(let ((x 0)) (progn| ))" "(progn |(let ((x 0)) ))") + ("(let ((x 0)) (progn|))" "(progn |(let ((x 0)) ))") + ;; One space should definitely be left between A and B here. + ("(let ((x 0)) a (progn|) b)" "(progn |(let ((x 0)) a b))") + ("(let ((x 0)) a (progn| ) b)" "(progn |(let ((x 0)) a b))") + ("(let ((x 0)) a (progn |) b)" "(progn |(let ((x 0)) a b))"))) -- cgit v1.2.1