nextest-rs / datatest-stable

Data-driven tests on stable Rust
https://docs.rs/datatest-stable
Other
36 stars 6 forks source link

How about supporting, skip, only #45

Closed webbdays closed 6 months ago

webbdays commented 6 months ago

Sometimes developers want to skip some tests files for run and even want to place such test files in codebase skipping tests for them entirely. or want to just run only one test file to save time.

webbdays commented 6 months ago

using fancy_regex was fine for skip. How about "only".

webbdays commented 6 months ago

Any idea of fancy regex pattern to support the both?

sunshowers commented 6 months ago

Don't quite understand your question, could you provide some concrete examples of what you want to match against?

webbdays commented 6 months ago

consider these are test files : test1.skip.md test2.md test3.md test4.only.md test5.only.md test5.skip.md

if we have any test file with .only,md i.e here we have test4.only.md then tests runner should run the first matching only.md i.e test4.only.md

all the .skip.md should be skipped from running and remaining should be run given there isn't atleast one .only.md

sunshowers commented 6 months ago

Thanks. I don't think datatest-stable should support that kind of "first matching test" feature -- it's out of its remit.

webbdays commented 6 months ago

regex will do. not the datatest-stable. harness!(test, root, pattern, only_pattern) like this.

webbdays commented 6 months ago

ok. I am also realising it as bit off the road. we should use regex pattern if possible. Thanks.