Theme provider and '-t' and '-c' CLI options

This commit is contained in:
veeso
2021-07-04 11:50:32 +02:00
parent a105a42519
commit 0a7e29d92f
50 changed files with 5453 additions and 1835 deletions

View File

@@ -185,6 +185,13 @@ pub fn make_fsentry(path: PathBuf, is_dir: bool) -> FsEntry {
}
}
/// ### create_file_ioers
///
/// Open a file with two handlers, the first is to read, the second is to write
pub fn create_file_ioers(p: &Path) -> (File, File) {
(File::open(p).ok().unwrap(), File::create(p).ok().unwrap())
}
mod test {
use super::*;
@@ -245,4 +252,10 @@ mod test {
assert!(make_dir_at(tmpdir.path(), "docs").is_ok());
assert!(make_dir_at(PathBuf::from("/aaaaa/bbbbb/cccc").as_path(), "docs").is_err());
}
#[test]
fn test_utils_test_helpers_create_file_ioers() {
let (_, tmp) = create_sample_file_entry();
let _ = create_file_ioers(tmp.path());
}
}