Define test command for Common Lisp projects

I tried `projectile-test-project`, but it only accepts shell commands,
whereas I wanted a faster way to run tests from the SLIME REPL.
This commit is contained in:
contrapunctus 2022-11-20 23:51:17 +05:30
parent 76d472b0e0
commit babf615646
1 changed files with 13 additions and 1 deletions

View File

@ -1057,7 +1057,8 @@ _u_: next word ^_l_: edit lines^ _s_: next whole symbol
("j" slime-edit-definition "Jump to definition")
("p" slime-repl-set-package "Set package")
("n" imenus "imenus")
("v" slime-inspect-presentation-at-point "inspect"))
("v" slime-inspect-presentation-at-point "inspect")
("t" my-run-cl-tests "test"))
#+END_SRC
**** eval
@ -5559,6 +5560,17 @@ All COMMAND-SPECS should be a list in the form
:config
(modify-syntax-entry ?\[ "(]" lisp-mode-syntax-table)
(modify-syntax-entry ?\] ")[" lisp-mode-syntax-table)) ;; cl-launch scripts
(defvar my-test-command nil
"Command which runs tests for the current project.")
(defun my-run-cl-tests ()
(interactive)
(cond ((bound-and-true-p my-test-command)
;; (slime-interactive-eval my-test-command)
(slime-repl-send-string my-test-command)
(slime-switch-to-output-buffer))
(t (message "my-test-commmand is unbound or nil"))))
#+END_SRC
*** redshank