| 2158 | |
| 2159 | #[test] |
| 2160 | fn test_repository_status_dirty_count() { |
| 2161 | let mut status = RepositoryStatus::new("dev".to_string(), None); |
| 2162 | |
| 2163 | status.add_entry(FileStatusEntry::new( |
| 2164 | PathBuf::from("modified.rs"), |
| 2165 | FileStatus::Modified, |
| 2166 | )); |
| 2167 | status.add_entry(FileStatusEntry::new( |
| 2168 | PathBuf::from("deleted.rs"), |
| 2169 | FileStatus::Deleted, |
| 2170 | )); |
| 2171 | status.add_entry(FileStatusEntry::new( |
| 2172 | PathBuf::from("clean.rs"), |
| 2173 | FileStatus::Clean, |
| 2174 | )); |
| 2175 | |
| 2176 | assert_eq!(status.dirty_count(), 2); |
| 2177 | } |
| 2178 | |
| 2179 | #[test] |
| 2180 | fn test_short_format_with_all_status_types() { |