Expand description
Crate provides a convinient functions for work with tables.
ⓘ
use testing_table::test_table;
test_table!(
test_tabled,
tabled::Table::new([[1, 2, 3]]),
"+---+---+---+"
"| 0 | 1 | 2 |"
"+---+---+---+"
"| 1 | 2 | 3 |"
"+---+---+---+"
);
ⓘ
use testing_table::assert_table;
assert_table!(
tabled::Table::new([[1, 2, 3]]),
"+---+---+---+"
"| 0 | 1 | 2 |"
"+---+---+---+"
"| 1 | 2 | 3 |"
"+---+---+---+"
);
use testing_table::static_table;
static_table!(
"+---+---+---+"
"| 0 | 1 | 2 |"
"+---+---+---+"
"| 1 | 2 | 3 |"
"+---+---+---+"
);
It was developed as a sub-project of tabled
.
Macros§
- assert_
table - Assert a given table.
- assert_
width - Assert a given table width.
- static_
table - Build a static table.
- test_
table - Create a test for a given table.
Functions§
- get_
char_ width - Returns a char width.
- get_
line_ width - Returns a string width.
- get_
string_ width - Returns a string width (accouting all characters).
- get_
text_ width - Returns a max string width of a line.