From c4d459f2b2ae74d1e6d450220486164bf4b2a8e2 Mon Sep 17 00:00:00 2001 From: Maxim Zhiburt Date: Thu, 11 Jul 2024 22:20:26 +0300 Subject: [PATCH] test --- crates/nu-command/tests/commands/table.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/nu-command/tests/commands/table.rs b/crates/nu-command/tests/commands/table.rs index 16d5eb54ab..a4869f6bfa 100644 --- a/crates/nu-command/tests/commands/table.rs +++ b/crates/nu-command/tests/commands/table.rs @@ -2895,3 +2895,9 @@ fn table_kv_header_on_separator_trim_algorithm() { let actual = nu!("$env.config.table.header_on_separator = true; {key1: '111111111111111111111111111111111111111111111111111111111111'} | table --width=60 --theme basic"); assert_eq!(actual.out, "+------+---------------------------------------------------+| key1 | 1111111111111111111111111111111111111111111111111 || | 11111111111 |+------+---------------------------------------------------+"); } + +#[test] +fn table_general_header_on_separator_trim_algorithm() { + let actual = nu!("$env.config.table.header_on_separator = true; [[a b]; ['11111111111111111111111111111111111111' 2] ] | table --width=20 --theme basic"); + assert_eq!(actual.out, "+-#-+----a-----+-b-+| 0 | 11111111 | 2 || | 11111111 | || | 11111111 | || | 11111111 | || | 111111 | |+---+----------+---+"); +}