mirror of
https://github.com/nushell/nushell.git
synced 2024-11-23 00:43:33 +01:00
7e096e61d7
fix #9796 Sorry that you've had the issues. I've actually encountered them yesterday too (seems like they have appeared after some refactoring in the middle) but was not able to fix that rapid. Created a bunch of tests. cc: @fdncred Note: This option will be certainly slower then a default ones. (could be fixed but ... maybe later). Maybe it shall be cited somewhere. PS: Haven't tested on a wrapped/expanded tables. --------- Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com> Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
30 lines
1.1 KiB
Rust
30 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\
|
|
╰────────────┴───────────┴───────────┴───────────╯"
|
|
);
|
|
}
|