]> git.eshelyaron.com Git - emacs.git/commitdiff
Convert manual indent test for lisp-mode into unit test
authorStefan Kangas <stefan@marxist.se>
Mon, 21 Sep 2020 14:23:24 +0000 (16:23 +0200)
committerStefan Kangas <stefan@marxist.se>
Mon, 21 Sep 2020 14:46:21 +0000 (16:46 +0200)
* test/manual/indent/lisp.lisp: Delete file.
* test/lisp/emacs-lisp/lisp-mode-tests.el (lisp-indent-defun):
New unit test based on deleted file.

test/lisp/emacs-lisp/lisp-mode-tests.el
test/manual/indent/lisp.lisp [deleted file]

index b1b7847961725f8cae986586018c4c74d18a9797..d1183d83f6a218840ac130699f295e57326f3cf4 100644 (file)
@@ -294,6 +294,18 @@ Expected initialization file: `%s'\"
     (insert "\"\n")
     (lisp-indent-region (point-min) (point-max))))
 
+(ert-deftest lisp-indent-defun ()
+  (with-temp-buffer
+    (lisp-mode)
+    (let ((orig "(defun x ()
+  (print (quote ( thingy great
+                 stuff)))
+  (print (quote (thingy great
+                       stuff))))"))
+      (insert orig)
+      (indent-region (point-min) (point-max))
+      (should (equal (buffer-string) orig)))))
+
 \f
 ;;; Fontification
 
diff --git a/test/manual/indent/lisp.lisp b/test/manual/indent/lisp.lisp
deleted file mode 100644 (file)
index f3874b5..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-(defun x ()
-  (print (quote ( thingy great
-                 stuff)))
-  (print (quote (thingy great
-                       stuff))))