nushell/crates/nu-table/tests/expand.rs
Maxim Zhiburt 8d8b011702
Bump tabled dependency to 0.11 (#8922)
close? #8060

Quite a bit of refactoring took place.
I believe a few improvements to collapse/expand were made.

I've tried to track any performance regressions and seems like it is
fine.

I've noticed something different now with default configuration path or
something in this regard?
So I might missed something while testing because of this.

Requires some oversight.

---------

Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
2023-04-26 13:56:10 -05:00

27 lines
1.1 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(theme::rounded())
.with_header(true)
.expand(true),
50,
);
assert_eq!(
table.unwrap(),
"╭────────────┬───────────┬───────────┬───────────╮\n\
│ 0 │ 1 │ 2 │ 3 │\n\
├────────────┼───────────┼───────────┼───────────┤\n\
│ 0 │ 1 │ 2 │ 3 │\n\
│ 0 │ 1 │ 2 │ 3 │\n\
╰────────────┴───────────┴───────────┴───────────╯"
);
}