I experimentally confirmed that tests blocks will return you to the original cwd the test was started in. This is a very useful feature, but I couldn't find it documented in either Fennec or Test::WorkFlow.
I'm hesitant to just document it as it appears to be a side effect of forking, and setting FENNEC_PARALLEL=0 breaks it. I use that when I want to debug tests.
Here's a small test to demonstrate the feature.
use Fennec;
use Path::Tiny;
tests "chdir" => sub {
note( Path::Tiny->cwd );
ok chdir "/";
};
tests "cwd" => sub {
note( Path::Tiny->cwd );
ok chdir "/";
};
done_testing;
I experimentally confirmed that
testsblocks will return you to the original cwd the test was started in. This is a very useful feature, but I couldn't find it documented in either Fennec or Test::WorkFlow.I'm hesitant to just document it as it appears to be a side effect of forking, and setting
FENNEC_PARALLEL=0breaks it. I use that when I want to debug tests.Here's a small test to demonstrate the feature.