Add test detection with detective and some handy lisp commands to run the test on the REPL#957
Conversation
- Add the commands lisp-test-run-buffer and lisp-test-run-current
|
Just when I finished doing this feature, I realize that @cxxxr had a similar idea about improving testing (https://github.com/lem-project/lem/pull/956/files), but I guess it has most of the job locally. So maybe we can combine both approaches. This one is clearly more static, using the available buffer information. I think it can be combine with a more package-base one so it's possible to run any test define on any package (with a simple selections prompts). Let me know what do you think 🙌 |
cxxxr
left a comment
There was a problem hiding this comment.
Thank you for the wonderful and PR!
I commented on this, but it is trivial and I would like to merge it.
| (current-expression | ||
| (lem:with-point ((p point)) | ||
| (funcall | ||
| (variable-value 'lem/language-mode::beginning-of-defun-function :buffer) |
There was a problem hiding this comment.
I see that beginning-of-defunctions are exported.
| (defun %default-capture (class position) | ||
| (let* ((line (str:split #\Space (line-string position))) | ||
| (name (second line))) | ||
| (name (str:replace-all ")" "" (second line)))) |
There was a problem hiding this comment.
I have learned from this that you don't necessarily have to write a serious parser.
lisp-test-run-bufferandlisp-test-run-current