| 1498 | |
| 1499 | #[test] |
| 1500 | fn test_repository_status_dirty_count() { |
| 1501 | let mut status = RepositoryStatus::new("dev".to_string(), None); |
| 1502 | |
| 1503 | status.add_entry(FileStatusEntry::new( |
| 1504 | PathBuf::from("modified.rs"), |
| 1505 | FileStatus::Modified, |
| 1506 | )); |
| 1507 | status.add_entry(FileStatusEntry::new( |
| 1508 | PathBuf::from("deleted.rs"), |
| 1509 | FileStatus::Deleted, |
| 1510 | )); |
| 1511 | status.add_entry(FileStatusEntry::new( |
| 1512 | PathBuf::from("clean.rs"), |
| 1513 | FileStatus::Clean, |
| 1514 | )); |
| 1515 | |
| 1516 | assert_eq!(status.dirty_count(), 2); |
| 1517 | } |
| 1518 | |
| 1519 | #[test] |
| 1520 | fn test_short_format_with_all_status_types() { |