[slime-cvs] CVS slime/contrib
CVS User nsiivola
nsiivola at common-lisp.net
Mon Oct 31 09:46:16 UTC 2011
Update of /project/slime/cvsroot/slime/contrib
In directory tiger.common-lisp.net:/tmp/cvs-serv11762/contrib
Modified Files:
ChangeLog slime-cl-indent.el
Log Message:
slime-indent: make it possible to run only a specific test
Useful for debugging.
--- /project/slime/cvsroot/slime/contrib/ChangeLog 2011/10/31 09:45:45 1.502
+++ /project/slime/cvsroot/slime/contrib/ChangeLog 2011/10/31 09:46:16 1.503
@@ -1,5 +1,10 @@
2011-10-31 Nikodemus Siivola <nikodemus at random-state.net>
+ * slime-cl-indent.el (common-lisp-run-indentation-tests): Make it
+ possible to run only a specific test.
+
+2011-10-31 Nikodemus Siivola <nikodemus at random-state.net>
+
Improve indentation of comments inside LOOP.
* slime-cl-indent-test.txt: New tests 54-63.
--- /project/slime/cvsroot/slime/contrib/slime-cl-indent.el 2011/10/31 09:45:45 1.52
+++ /project/slime/cvsroot/slime/contrib/slime-cl-indent.el 2011/10/31 09:46:16 1.53
@@ -1620,7 +1620,7 @@
test
(buffer-string))))))
-(defun common-lisp-run-indentation-tests ()
+(defun common-lisp-run-indentation-tests (run)
(define-common-lisp-style "common-lisp-indent-test"
;; Used to specify a few complex indentation specs for testing.
(:inherit "basic")
@@ -1633,7 +1633,8 @@
(insert-file "slime-cl-indent-test.txt")
(goto-char 0)
(let ((test-mark ";;; Test: ")
- (n 0))
+ (n 0)
+ (test-to-run (or (eq t run) (format "%s" run))))
(while (not (eobp))
(if (looking-at test-mark)
(let* ((name-start (progn (search-forward ": ") (point)))
@@ -1660,13 +1661,18 @@
(let ((test-start (point)))
(while (not (or (eobp) (looking-at test-mark)))
(forward-line 1))
- (let ((test (buffer-substring-no-properties test-start (point))))
- (common-lisp-indent-test test-name bindings test)
- (incf n))))
+ (when (or (eq t run) (equal test-to-run test-name))
+ (let ((test (buffer-substring-no-properties test-start (point))))
+ (common-lisp-indent-test test-name bindings test)
+ (incf n)))))
(forward-line 1)))
(common-lisp-delete-style "common-lisp-indent-test")
(message "%s tests OK." n))))
-;;; (common-lisp-run-indentation-tests)
+;;; Run all tests:
+;;; (common-lisp-run-indentation-tests t)
+;;;
+;;; Run specific test:
+;;; (common-lisp-run-indentation-tests 17)
;;; cl-indent.el ends here
More information about the slime-cvs
mailing list