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

Function test_find_local_only_changes

atomic-cli/src/commands/pull/helpers.rs:617–630  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

615 /// Test finding specific local-only changes.
616 #[test]
617 fn test_find_local_only_changes() {
618 let local_entries = vec![
619 create_test_history_entry(b"shared", 0),
620 create_test_history_entry(b"local1", 1),
621 create_test_history_entry(b"local2", 2),
622 ];
623 let remote_entries = vec![create_test_changelist_entry(b"shared", 0, false)];
624
625 let local_only = find_local_only_changes(&local_entries, &remote_entries);
626
627 assert_eq!(local_only.len(), 2);
628 assert!(local_only.contains(&Hash::of(b"local1").to_base32()));
629 assert!(local_only.contains(&Hash::of(b"local2").to_base32()));
630 }
631
632 // Error Conversion Tests
633

Callers

nothing calls this directly

Calls 1

find_local_only_changesFunction · 0.85

Tested by

no test coverage detected