| 1344 | |
| 1345 | #[test] |
| 1346 | fn test_repository_status_dirty_count() { |
| 1347 | let mut status = RepositoryStatus::new("dev".to_string(), None); |
| 1348 | |
| 1349 | status.add_entry(FileStatusEntry::new( |
| 1350 | PathBuf::from("modified.rs"), |
| 1351 | FileStatus::Modified, |
| 1352 | )); |
| 1353 | status.add_entry(FileStatusEntry::new( |
| 1354 | PathBuf::from("deleted.rs"), |
| 1355 | FileStatus::Deleted, |
| 1356 | )); |
| 1357 | status.add_entry(FileStatusEntry::new( |
| 1358 | PathBuf::from("clean.rs"), |
| 1359 | FileStatus::Clean, |
| 1360 | )); |
| 1361 | |
| 1362 | assert_eq!(status.dirty_count(), 2); |
| 1363 | } |
| 1364 | |
| 1365 | #[test] |
| 1366 | fn test_short_format_with_all_status_types() { |