()
| 345 | |
| 346 | #[test] |
| 347 | fn test_untracked_file() { |
| 348 | let (repo, _temp, _repo_path) = create_test_repo(); |
| 349 | |
| 350 | // Create a change hash to test with (but don't actually record anything) |
| 351 | let fake_hash = Hash::of(b"some hash"); |
| 352 | |
| 353 | // Try to get content for an untracked file |
| 354 | let before = repo.get_file_content_before_change("nonexistent.txt", &fake_hash); |
| 355 | let after = repo.get_file_content_after_change("nonexistent.txt", &fake_hash); |
| 356 | |
| 357 | // Should return Ok(None) for untracked files |
| 358 | assert!(before.is_ok()); |
| 359 | assert!(before.unwrap().is_none()); |
| 360 | assert!(after.is_ok()); |
| 361 | assert!(after.unwrap().is_none()); |
| 362 | } |
| 363 | |
| 364 | // Edge Case Tests |
| 365 |
nothing calls this directly
no test coverage detected