()
| 1248 | |
| 1249 | #[test] |
| 1250 | fn test_collect_working_copy_files() { |
| 1251 | use tempfile::TempDir; |
| 1252 | |
| 1253 | let temp_dir = TempDir::new().unwrap(); |
| 1254 | let root = temp_dir.path(); |
| 1255 | |
| 1256 | // Create some files |
| 1257 | std::fs::write(root.join("file1.txt"), b"content1").unwrap(); |
| 1258 | std::fs::create_dir_all(root.join("src")).unwrap(); |
| 1259 | std::fs::write(root.join("src/main.rs"), b"fn main() {}").unwrap(); |
| 1260 | |
| 1261 | // Create .atomic directory (should be ignored) |
| 1262 | std::fs::create_dir_all(root.join(".atomic")).unwrap(); |
| 1263 | std::fs::write(root.join(".atomic/config.toml"), b"test").unwrap(); |
| 1264 | |
| 1265 | let options = StatusOptions::default(); |
| 1266 | let files = collect_working_copy_files(root, &options).unwrap(); |
| 1267 | |
| 1268 | assert!(files.contains(&PathBuf::from("file1.txt"))); |
| 1269 | assert!(files.contains(&PathBuf::from("src/main.rs"))); |
| 1270 | assert!(!files.contains(&PathBuf::from(".atomic/config.toml"))); |
| 1271 | } |
| 1272 | |
| 1273 | #[test] |
| 1274 | fn test_collect_working_copy_files_with_filter() { |
nothing calls this directly
no test coverage detected