diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-01-12 04:28:28 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-01-12 04:51:34 +0800 |
| commit | c5fb22694e95f12c24b8d8af76999be7aea3fcec (patch) | |
| tree | 399d8a24ce491fb635f3d09f2123290fe784059e /data/tests/src/lib.rs | |
| parent | 444754489aca0454eb54e15a49fb8a6db0b68a07 (diff) | |
Reorganize crate structure and move documentation files
Diffstat (limited to 'data/tests/src/lib.rs')
| -rw-r--r-- | data/tests/src/lib.rs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/data/tests/src/lib.rs b/data/tests/src/lib.rs new file mode 100644 index 0000000..ced2d3d --- /dev/null +++ b/data/tests/src/lib.rs @@ -0,0 +1,30 @@ +use std::{env::current_dir, path::PathBuf}; + +use tokio::fs; + +#[cfg(test)] +pub mod test_vault_setup_and_member_register; + +#[cfg(test)] +pub mod test_virtual_file_creation_and_update; + +#[cfg(test)] +pub mod test_local_workspace_setup_and_account_management; + +#[cfg(test)] +pub mod test_sheet_creation_management_and_persistence; + +#[cfg(test)] +pub mod test_sheet_share_creation_and_management; + +pub async fn get_test_dir(area: &str) -> Result<PathBuf, std::io::Error> { + let dir = current_dir()?.join(".temp").join("test").join(area); + if !dir.exists() { + std::fs::create_dir_all(&dir)?; + } else { + // Regenerate existing directory + fs::remove_dir_all(&dir).await?; + fs::create_dir_all(&dir).await?; + } + Ok(dir) +} |
