@@ -29,9 +29,10 @@ harness = false
2929
30302 . Call the ` datatest_stable::harness!(testfn, root, pattern) ` macro with the following
3131parameters:
32- * ` testfn ` - The test function to be executed on each matching input. This function must have
33- the type ` fn(&Utf8Path) -> datatest_stable::Result<()> ` . (` Utf8Path ` is part of the
34- [ ` camino ` ] ( https://docs.rs/camino ) library.)
32+ * ` testfn ` - The test function to be executed on each matching input. This function can be one of:
33+ * ` fn(&Path) -> datatest_stable::Result<()> `
34+ * ` fn(&Utf8Path) -> datatest_stable::Result<()> ` (` Utf8Path ` is part of the
35+ [ ` camino ` ] ( https://docs.rs/camino ) library, and is re-exported here for convenience.)
3536* ` root ` - The path to the root directory where the input files (fixtures) live. This path is
3637 relative to the root of the crate.
3738* ` pattern ` - the regex used to match against and select each file to be tested.
@@ -45,14 +46,24 @@ This is an example test. Use it with `harness = false`.
4546
4647``` rust
4748use datatest_stable :: Utf8Path ;
49+ use std :: path :: Path ;
4850
49- fn my_test (path : & Utf8Path ) -> datatest_stable :: Result <()> {
51+ fn my_test (path : & Path ) -> datatest_stable :: Result <()> {
5052 // ... write test here
5153
5254 Ok (())
5355}
5456
55- datatest_stable :: harness! (my_test , " path/to/fixtures" , r " ^.*/*" );
57+ fn my_test_utf8 (path : & Utf8Path ) -> datatest_stable :: Result <()> {
58+ // ... write test here
59+
60+ Ok (())
61+ }
62+
63+ datatest_stable :: harness! (
64+ my_test , " path/to/fixtures" , r " ^.*/*" ,
65+ my_test_utf8 , " path/to/fixtures" , r " ^.*/*,
66+ );
5667```
5768
5869## Minimum supported Rust version (MSRV)
0 commit comments