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

Function test_format_hash_with_custom_length

atomic-cli/src/commands/mod.rs:709–718  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

707
708 #[test]
709 fn test_format_hash_with_custom_length() {
710 let bytes = [0u8; 32];
711 let hash = Hash::from_bytes(bytes);
712
713 let formatted = format_hash_with_length(&hash, 8);
714 assert!(formatted.len() <= 11); // 8 + 3 for "..."
715
716 let full = format_hash_with_length(&hash, 0);
717 assert!(!full.ends_with("..."));
718 }
719
720 // -------------------------------------------------------------------------
721 // Timestamp Formatting Tests

Callers

nothing calls this directly

Calls 1

format_hash_with_lengthFunction · 0.85

Tested by

no test coverage detected