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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

add_entryMethod · 0.80

Tested by

no test coverage detected