Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

[Feature Request] [move-cli] The move-cli package test --filter parameter support for regular expressions #271

Open
yubing744 opened this issue Jul 17, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@yubing744
Copy link
Contributor

🚀 Feature Request

Motivation

I am currently developing statcoin-ide, and when adding and running a single test case, I found that the filter parameter will match multiple test cases. I hope that the filter parameter supports passing in regular expressions, so that I can do whole word matching.

Pitch

Describe the solution you'd like

move package test --filter /^0x2::M::nop$/
If filter is not a regular expression, use the original logic

Are you willing to open a pull request? (See CONTRIBUTING)
YES

Additional context

Starcoin-ide bug for match multiple test cases

@yubing744 yubing744 added the enhancement New feature or request label Jul 17, 2022
@jolestar
Copy link
Collaborator

Cargo adds a --exact flag to test for this.

cargo test test_fn_name -- --exact

Maybe add a new flag also an option? like:

move package test --filter 0x2::M::nop --exact

@mkurnikov
Copy link
Contributor

+1 from me, intellij-move too constantly hits this issue with names of tests present as substring for another test.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants