mirror of
https://github.com/nushell/nushell.git
synced 2024-11-23 00:43:33 +01:00
24 lines
1.0 KiB
Rust
24 lines
1.0 KiB
Rust
mod common;
|
|
|
|
use common::{create_row, create_table};
|
|
use nu_table::{TableConfig, TableTheme as theme};
|
|
|
|
#[test]
|
|
fn test_expand() {
|
|
let table = create_table(
|
|
vec![create_row(4); 3],
|
|
TableConfig::new(theme::rounded(), true, false, false).expand(),
|
|
50,
|
|
);
|
|
|
|
assert_eq!(
|
|
table.unwrap(),
|
|
"╭────────────┬───────────┬───────────┬───────────╮\n\
|
|
│ 0 │ 1 │ 2 │ 3 │\n\
|
|
├────────────┼───────────┼───────────┼───────────┤\n\
|
|
│ 0 │ 1 │ 2 │ 3 │\n\
|
|
│ 0 │ 1 │ 2 │ 3 │\n\
|
|
╰────────────┴───────────┴───────────┴───────────╯"
|
|
);
|
|
}
|