fakeenv
A simple wrapper of std::env
which allows faking the environment.
Example
Using the real environment
use EnvStore;
Making a fake environment
Fake is only turned on when the fake
feature is enabled.
As this is mostly for testing purpose, you might want to enable the feature like this:
[]
= "0.1.0"
[]
= { = "0.1.0", = ["fake"] }
Then you can generate a fake environment using EnvStore::fake
:
use EnvStore;
Faking user directories
The dirs
feature enables faking the dirs
functions.
[]
= { = "0.1.0", = ["dirs"] }
let env = real;
println!;