()
| 849 | /// Test cleanup_on_error function. |
| 850 | #[test] |
| 851 | fn test_cleanup_on_error() { |
| 852 | let temp = tempdir().unwrap(); |
| 853 | let target = temp.path().join("failed-clone"); |
| 854 | |
| 855 | std::fs::create_dir(&target).unwrap(); |
| 856 | assert!(target.exists()); |
| 857 | |
| 858 | cleanup_on_error(&target); |
| 859 | |
| 860 | assert!(!target.exists()); |
| 861 | } |
| 862 | |
| 863 | /// Test cleanup_on_error with non-existent path. |
| 864 | #[test] |
nothing calls this directly
no test coverage detected