move
move copied to clipboard
[Feature Request] [move-cli] The `move-cli package test --filter` parameter support for regular expressions
🚀 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
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
+1 from me, intellij-move too constantly hits this issue with names of tests present as substring for another test.