MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_remove_recursive

Function test_remove_recursive

atomic-core/src/output/filesystem/tests.rs:498–506  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

496
497#[test]
498fn test_remove_recursive() {
499 let (dir, fs) = temp_fs();
500 std::fs::create_dir_all(dir.path().join("a/b/c")).unwrap();
501 std::fs::write(dir.path().join("a/b/c/file.txt"), "").unwrap();
502 std::fs::write(dir.path().join("a/b/other.txt"), "").unwrap();
503
504 fs.remove_path("a", true).unwrap();
505 assert!(!dir.path().join("a").exists());
506}
507
508#[test]
509fn test_remove_not_found() {

Callers

nothing calls this directly

Calls 5

temp_fsFunction · 0.85
writeFunction · 0.50
unwrapMethod · 0.45
pathMethod · 0.45
remove_pathMethod · 0.45

Tested by

no test coverage detected