move icon indicating copy to clipboard operation
move copied to clipboard

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

Open yubing744 opened this issue 2 years ago • 2 comments

🚀 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 avatar Jul 17 '22 04:07 yubing744

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

jolestar avatar Jul 17 '22 14:07 jolestar

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

mkurnikov avatar Jul 23 '22 10:07 mkurnikov