efes
A collection of macros to simplify testing involving filesystems. The crate exposes two macros: gen_fs and gen_paths. gen_fs is used to actually create files on the system in a given directory. gen_paths generates a vector of paths based on the provided input.
Example
gen_fs
let root_dir = from;
gen_fs!;
which would create a directory structure in root_dir equivalent to the following:
.
├── a
│ ├── file1
│ └── file2
├── another_directory
│ ├── bar
│ └── foo
├── b
└── c
gen_paths
let root_dir = from;
let expected = gen_paths!;
assert_eq!;
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
See CONTRIBUTING.md.