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

fix(testables): Prevent using nextest for doctests #246

Merged
merged 3 commits into from
Feb 20, 2024

Conversation

bltavares
Copy link
Contributor

When cargo-nextest is detected, it becomes the executable to trigger testable runnables.

Unfortunally, nextest does not support doc tests. This causes the doctest runnables to fail when the binary is available on the path.

This commit prevents the use of 'nextest' for 'doctest' runnables, falling back to the cargo test --doc executable in this case.

This way, we can do :RustLsp testables and run both #[tests] and doctests properly.


Review Checklist

  • Pull request title has the appropriate conventional commit prefix.
    If applicable:
  • Tested
    • Tests have been added.
    • Tested manually (Steps to reproduce in PR description).
  • Updated documentation.
  • Updated CHANGELOG.md

When `cargo-nextest` is detected, it becomes the executable to trigger
`testable` runnables.

Unfortunally, `nextest` does not support doc tests. This causes the
doctest runnables to fail when the binary is available on the path.

This commit prevents the use of 'nextest' for 'doctest' runnables,
falling back to the `cargo test --doc` executable in this case.

This way, we can do `:RustLsp testables` and run both `#[tests]` and
`doctests` properly.
Repository owner deleted a comment from github-actions bot Feb 20, 2024
mrcjkb
mrcjkb previously approved these changes Feb 20, 2024
Copy link
Owner

@mrcjkb mrcjkb left a comment

Choose a reason for hiding this comment

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

Thanks again 😄

@mrcjkb mrcjkb disabled auto-merge February 20, 2024 17:10
@mrcjkb mrcjkb merged commit 520d88d into mrcjkb:master Feb 20, 2024
5 checks 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.

None yet

2 participants