mirror of
https://github.com/nushell/nushell
synced 2024-12-31 23:39:00 +00:00
7162289d77
A patch to play with. Need to make a few tests after all. The question is what shall be done with `table.mode = none`, as it has no borders. ```nu $env.config.table.move_header = true ``` ![image](https://github.com/nushell/nushell/assets/20165848/cdcffa6d-989c-4368-a436-fdf7d3400e31) cc: @fdncred --------- Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
29 lines
1.1 KiB
Rust
29 lines
1.1 KiB
Rust
mod common;
|
|
|
|
use common::{create_row, create_table};
|
|
|
|
use nu_table::{NuTableConfig, TableTheme as theme};
|
|
|
|
#[test]
|
|
fn test_expand() {
|
|
let table = create_table(
|
|
vec![create_row(4); 3],
|
|
NuTableConfig {
|
|
theme: theme::rounded(),
|
|
with_header: true,
|
|
expand: true,
|
|
..Default::default()
|
|
},
|
|
50,
|
|
);
|
|
|
|
assert_eq!(
|
|
table.unwrap(),
|
|
"╭────────────┬───────────┬───────────┬───────────╮\n\
|
|
│ 0 │ 1 │ 2 │ 3 │\n\
|
|
├────────────┼───────────┼───────────┼───────────┤\n\
|
|
│ 0 │ 1 │ 2 │ 3 │\n\
|
|
│ 0 │ 1 │ 2 │ 3 │\n\
|
|
╰────────────┴───────────┴───────────┴───────────╯"
|
|
);
|
|
}
|