MCPcopy Create free account
hub / github.com/dtormoen/tsk-tsk / test_remove_dir

Function test_remove_dir

src/file_system.rs:377–396  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

375
376 #[tokio::test]
377 async fn test_remove_dir() {
378 let temp_dir = TempDir::new().unwrap();
379
380 let test_dir = temp_dir.path().join("test_dir");
381
382 // Create directory with content
383 create_dir(&test_dir).await.unwrap();
384 write_file(&test_dir.join("file.txt"), "content")
385 .await
386 .unwrap();
387
388 // Verify it exists
389 assert!(exists(&test_dir).await.unwrap());
390
391 // Remove directory
392 remove_dir(&test_dir).await.unwrap();
393
394 // Verify it's gone
395 assert!(!exists(&test_dir).await.unwrap());
396 }
397
398 #[tokio::test]
399 async fn test_remove_file() {

Callers

nothing calls this directly

Calls 4

create_dirFunction · 0.85
write_fileFunction · 0.85
remove_dirFunction · 0.85
pathMethod · 0.80

Tested by

no test coverage detected