From 27f6414ad1ff451feb0044af62f37dc2a6255ffa Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Thu, 5 Feb 2026 22:35:05 +0800 Subject: Remove examples and legacy code, update .gitignore - Delete examples directory and its example action system - Rename actions/ to legacy_actions/ and data/ to legacy_data/ - Update Cargo.toml license file reference - Move setup scripts to scripts/dev/ directory - Add todo.txt patterns to .gitignore --- legacy_data/tests/src/lib.rs | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 legacy_data/tests/src/lib.rs (limited to 'legacy_data/tests/src/lib.rs') diff --git a/legacy_data/tests/src/lib.rs b/legacy_data/tests/src/lib.rs new file mode 100644 index 0000000..ced2d3d --- /dev/null +++ b/legacy_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 { + 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) +} -- cgit