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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

format_hash_with_lengthFunction · 0.85

Tested by

no test coverage detected