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

Function test_kv_table_no_alignment

atomic-cli/src/output/table.rs:861–872  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

859
860 #[test]
861 fn test_kv_table_no_alignment() {
862 let table = KeyValueTable::new()
863 .align_values(false)
864 .add("Short", "1")
865 .add("VeryLongKey", "2");
866
867 let output = table.to_string();
868 let lines: Vec<&str> = output.lines().collect();
869 // Without alignment, each line should start immediately after the key
870 assert!(lines[0].starts_with("Short:"));
871 assert!(lines[1].starts_with("VeryLongKey:"));
872 }
873
874 #[test]
875 fn test_kv_table_empty() {

Callers

nothing calls this directly

Calls 3

align_valuesMethod · 0.80
addMethod · 0.45
linesMethod · 0.45

Tested by

no test coverage detected