summaryrefslogtreecommitdiff
path: root/test.el
diff options
context:
space:
mode:
authorTaylor R Campbell <campbell+paredit@mumble.net>2017-04-05 18:47:53 +0000
committerTaylor R Campbell <campbell+paredit@mumble.net>2017-04-05 18:48:14 +0000
commit38899558cf242187966d8bf1771a3c8e48eb5090 (patch)
treeef76ff6c4137b318c551b4a6f5fc7637e14b813f /test.el
parent7c27746a8eb259ae24b5dce9380801c4846258f0 (diff)
Don't reindent single-line edits in paredit-raise-sexp.
Add a couple trivial tests for paredit-raise-sexp. Bug reported by Alex Plotnick.
Diffstat (limited to 'test.el')
-rw-r--r--test.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/test.el b/test.el
index f3444af..307747b 100644
--- a/test.el
+++ b/test.el
@@ -1409,3 +1409,11 @@ Four arguments: the paredit command, the text of the buffer
("(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))")))
+
+(paredit-test 'paredit-raise-sexp
+ `((,(concat
+ "(let ((x 5))\n (let ((y 3))\n |(foo bar\n baz)\n"
+ " (quux))\n (wrong indent))")
+ "(let ((x 5))\n |(foo bar\n baz)\n (wrong indent))")
+ ("(define (f x #!optional\n (|wrong indent))\n (+ 1 2))"
+ "(define (f x #!optional\n |wrong)\n (+ 1 2))")))