From 111273cb6975531f447573edc5658146c06fccd6 Mon Sep 17 00:00:00 2001 From: Talison Fabio <54823205+talis-fb@users.noreply.github.com> Date: Sat, 26 Apr 2025 10:33:00 -0300 Subject: [PATCH] fix: revert remove create_n_random_files --- tests/integration.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/integration.rs b/tests/integration.rs index 9b1bfcb..0216a48 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -88,6 +88,24 @@ fn create_random_files(dir: impl Into, depth: u8, rng: &mut SmallRng) { } } +/// Create n random files on directory dir +fn create_n_random_files(n: usize, dir: impl Into, rng: &mut SmallRng) { + let dir: &PathBuf = &dir.into(); + + for _ in 0..n { + write_random_content( + &mut tempfile::Builder::new() + .prefix("file") + .tempfile_in(dir) + .unwrap() + .keep() + .unwrap() + .0, + rng, + ); + } +} + /// Compress and decompress a single empty file #[proptest(cases = 200)] fn single_empty_file(ext: Extension, #[any(size_range(0..8).lift())] exts: Vec) {