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

Function test_table_render_basic

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

Source from the content-addressed store, hash-verified

747
748 #[test]
749 fn test_table_render_basic() {
750 let mut table = Table::new();
751 table.set_header(vec!["Name", "Value"]);
752 table.add_row(vec!["foo", "42"]);
753
754 let output = table.to_string();
755 assert!(output.contains("Name"));
756 assert!(output.contains("Value"));
757 assert!(output.contains("foo"));
758 assert!(output.contains("42"));
759 }
760
761 #[test]
762 fn test_table_render_with_alignment() {

Callers

nothing calls this directly

Calls 2

set_headerMethod · 0.80
add_rowMethod · 0.80

Tested by

no test coverage detected