Debian Codegraph @

tests/all/edge_cases.rs

raw symbols SCIP
1 use comfy_table::*;
2
3 /// A gigantic table can generated, even if it's longer than the longest supported width.
4 #[test]
5 fn giant_table() {
6 let mut table = Table::new();
7 table.set_header(["a".repeat(1_000_000)]);
8 table.add_row(["a".repeat(1_000_000)]);
9
10 table.to_string();
11 }
12
13 /// No panic, even if there's a ridiculous amount of padding.
14 #[test]
15 fn max_padding() {
16 let mut table = Table::new();
17 table.add_row(["test"]);
18 let column = table.column_mut(0).unwrap();
19
20 column.set_padding((u16::MAX, u16::MAX));
21
22 table.to_string();
23 }