mirror of
https://github.com/nushell/nushell
synced 2025-01-13 13:49:21 +00:00
4401924128
With this comes a new `unicode-width` as I remember there was some issue
with `ratatui`.
And a bit of refactorings which are ment to reduce code lines while not
breaking anything.
Not yet complete, I think I'll try to improve some more places,
just wanted to trigger CI 😄
And yessssssssss we have a new `unicode-width` but I sort of doubtful,
I mean the original issue with emojie.
I think it may require an additional "clean" call.
I am just saying I was not testing it with that case of complex emojies.
---------
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
23 lines
1,021 B
Rust
23 lines
1,021 B
Rust
mod common;
|
|
|
|
use common::{create_row, create_table, TestCase};
|
|
|
|
use nu_table::TableTheme as theme;
|
|
|
|
#[test]
|
|
fn test_expand() {
|
|
let table = create_table(
|
|
vec![create_row(4); 3],
|
|
TestCase::new(50).theme(theme::rounded()).header().expand(),
|
|
);
|
|
|
|
assert_eq!(
|
|
table.unwrap(),
|
|
"╭────────────┬───────────┬───────────┬───────────╮\n\
|
|
│ 0 │ 1 │ 2 │ 3 │\n\
|
|
├────────────┼───────────┼───────────┼───────────┤\n\
|
|
│ 0 │ 1 │ 2 │ 3 │\n\
|
|
│ 0 │ 1 │ 2 │ 3 │\n\
|
|
╰────────────┴───────────┴───────────┴───────────╯"
|
|
);
|
|
}
|