Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Update regex use to match test for external librairies #1740

Merged
merged 1 commit into from
Jun 20, 2022

Conversation

arthurlm
Copy link
Contributor

Make test regex a little bit more permissive.
This will allow external libs that have special test macro to be recognize as valid test case.

For example, following macros will be recognized as valid test case:

#[test]
#[tokio::test]
#[async_std::test]
#[actix_web::test]
#[actix_rt::test]
#[actix_web::rt::test]

Issue was at beginning reported in vscode-rust repo here and author switch from rls to rust-analyser.

Looking at rust-analyser, everything that has test in function attributes is recognized as a test (see code here).
Running test or not is a choice left to user, even if it does not work perfectly.

Make #[test] regex a little bit more permissive to allow external
libs that have special test macro to be recognize as valid test case.
@saeedtabrizi
Copy link

Is there any update here ?
I have same issue .

@Xanewok
Copy link
Member

Xanewok commented Jun 20, 2022

This looks useful, thanks a lot.

@Xanewok Xanewok merged commit b36840e into rust-lang:master Jun 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants