Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test detection with detective and some handy lisp commands to run the test on the REPL #957

Merged
merged 7 commits into from
Aug 16, 2023

Conversation

Sasanidas
Copy link
Member

  • Add the detective ability to get misc references (only tests for now)
  • Add a few convenience options to detective, so it's more flexible
  • Add two commands to run tests: lisp-test-run-buffer and lisp-test-run-current

@Sasanidas Sasanidas requested a review from cxxxr August 15, 2023 17:11
@Sasanidas
Copy link
Member Author

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 🙌

Copy link
Member

@cxxxr cxxxr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that beginning-of-defunctions are exported.

@@ -6,7 +6,7 @@

(defun %default-capture (class position)
(let* ((line (str:split #\Space (line-string position)))
(name (second line)))
(name (str:replace-all ")" "" (second line))))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have learned from this that you don't necessarily have to write a serious parser.

@cxxxr cxxxr merged commit d2d6e6d into lem-project:main Aug 16, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants