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:1500–1517  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

add_entryMethod · 0.80

Tested by

no test coverage detected