MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_repository_status_dirty_count

Function test_repository_status_dirty_count

atomic-cli/src/commands/status.rs:1346–1363  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 1

add_entryMethod · 0.80

Tested by

no test coverage detected