mirror of
https://github.com/nushell/nushell.git
synced 2025-04-14 16:28:17 +02:00
cargo fmt
This commit is contained in:
parent
119e62e2b4
commit
2c9b09af0d
@ -1106,7 +1106,8 @@ fn create_empty_placeholder(
|
||||
let style_computer = &StyleComputer::from_config(engine_state, stack);
|
||||
configure_table(&mut out, &config, style_computer, TableMode::default());
|
||||
|
||||
let ret = out.table
|
||||
let ret = out
|
||||
.table
|
||||
.draw(termwidth)
|
||||
.expect("Could not create empty table placeholder");
|
||||
maybe_strip_color(ret, use_ansi_coloring)
|
||||
|
@ -3122,41 +3122,26 @@ fn table_colors() {
|
||||
|
||||
#[test]
|
||||
fn empty_table_colors() {
|
||||
let actual = nu!(concat!(
|
||||
"$env.config.use_ansi_coloring = true;",
|
||||
"{}",
|
||||
));
|
||||
let actual = nu!(concat!("$env.config.use_ansi_coloring = true;", "{}",));
|
||||
assert_eq!(
|
||||
actual.out,
|
||||
"\u{1b}[37m╭──────────────╮\u{1b}[0m\u{1b}[37m│\u{1b}[0m \u{1b}[2mempty record\u{1b}[0m \u{1b}[37m│\u{1b}[0m\u{1b}[37m╰──────────────╯\u{1b}[0m"
|
||||
);
|
||||
|
||||
let actual = nu!(concat!(
|
||||
"$env.config.use_ansi_coloring = true;",
|
||||
"[]",
|
||||
));
|
||||
let actual = nu!(concat!("$env.config.use_ansi_coloring = true;", "[]",));
|
||||
assert_eq!(
|
||||
actual.out,
|
||||
"\u{1b}[37m╭────────────╮\u{1b}[0m\u{1b}[37m│\u{1b}[0m \u{1b}[2mempty list\u{1b}[0m \u{1b}[37m│\u{1b}[0m\u{1b}[37m╰────────────╯\u{1b}[0m"
|
||||
);
|
||||
|
||||
let actual = nu!(concat!(
|
||||
"$env.config.use_ansi_coloring = false;",
|
||||
"{}",
|
||||
));
|
||||
let actual = nu!(concat!("$env.config.use_ansi_coloring = false;", "{}",));
|
||||
assert_eq!(
|
||||
actual.out,
|
||||
"╭──────────────╮│ empty record │╰──────────────╯"
|
||||
);
|
||||
|
||||
let actual = nu!(concat!(
|
||||
"$env.config.use_ansi_coloring = false;",
|
||||
"[]",
|
||||
));
|
||||
assert_eq!(
|
||||
actual.out,
|
||||
"╭────────────╮│ empty list │╰────────────╯"
|
||||
);
|
||||
let actual = nu!(concat!("$env.config.use_ansi_coloring = false;", "[]",));
|
||||
assert_eq!(actual.out, "╭────────────╮│ empty list │╰────────────╯");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
Loading…
Reference in New Issue
Block a user