Open wiktor-k opened 2 months ago
I think this is fair to consider in-scope, thanks for reporting.
I think the entire directory structure created here is not intuitive. Ideally this would indicate it is a doc test and still have the module structure somehow. Not sure if this is possible though.
Hi,
I believe this may be out of scope for testdir but I think it still needs to be documented as it surprised me.
testdir::testdir!()
generates the same directories when executed in a doctest.Minimal reproducer (
src/lib.rs
):Running it with
cargo test
shows this output:Both of them generated the same path:
"/home/wiktor/tmp/cargo/testdir-198/rust_out/h9f5ab6561c35996e"
and some test may want to use isolated dirs.This is similar to https://github.com/flub/testdir/issues/6 but instead of rstest it's doctests.