fstest
fstest provides a procedural macro attribute for simplifying integration tests involving
temporary file system setups and optional Git repository initialization.
This crate defines the #[fstest] macro, which wraps a test function and handles:
- Creation of a temporary working directory
- Optional initialization of a Git repository in the temporary directory
- Copying of specified input files into the temp directory
- Restoring the original working directory after test execution
Usage
use cmd_test;
//arguments are optional!
See examples folder for examples.
Installation
Add crate and serial_test and tempfile to your dev dependencies.
[]
= "0.2.0"