()
| 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() { |
nothing calls this directly
no test coverage detected