()
| 1541 | |
| 1542 | #[test] |
| 1543 | fn test_collect_working_copy_files() { |
| 1544 | use tempfile::TempDir; |
| 1545 | |
| 1546 | let temp_dir = TempDir::new().unwrap(); |
| 1547 | let root = temp_dir.path(); |
| 1548 | |
| 1549 | // Create some files |
| 1550 | std::fs::write(root.join("file1.txt"), b"content1").unwrap(); |
| 1551 | std::fs::create_dir_all(root.join("src")).unwrap(); |
| 1552 | std::fs::write(root.join("src/main.rs"), b"fn main() {}").unwrap(); |
| 1553 | |
| 1554 | // Create .atomic directory (should be ignored) |
| 1555 | std::fs::create_dir_all(root.join(".atomic")).unwrap(); |
| 1556 | std::fs::write(root.join(".atomic/config.toml"), b"test").unwrap(); |
| 1557 | |
| 1558 | let options = StatusOptions::default(); |
| 1559 | let files = collect_working_copy_files(root, &options).unwrap(); |
| 1560 | |
| 1561 | assert!(files.contains(&PathBuf::from("file1.txt"))); |
| 1562 | assert!(files.contains(&PathBuf::from("src/main.rs"))); |
| 1563 | assert!(!files.contains(&PathBuf::from(".atomic/config.toml"))); |
| 1564 | } |
| 1565 | |
| 1566 | #[test] |
| 1567 | fn test_collect_working_copy_files_with_filter() { |
nothing calls this directly
no test coverage detected