From f32828625e6776d672b7fad74708d7da328d543f Mon Sep 17 00:00:00 2001 From: Tim 'Piepmatz' Hesse Date: Fri, 20 Dec 2024 23:26:05 +0100 Subject: [PATCH] updated error test to enforce ansi colors --- crates/nu-protocol/tests/test_config.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/nu-protocol/tests/test_config.rs b/crates/nu-protocol/tests/test_config.rs index eb57903685..81a0a7dede 100644 --- a/crates/nu-protocol/tests/test_config.rs +++ b/crates/nu-protocol/tests/test_config.rs @@ -53,6 +53,7 @@ fn filesize_format_auto_metric_false() { #[test] fn fancy_default_errors() { let code = nu_repl_code(&[ + "$env.config.use_ansi_coloring = true", r#"def force_error [x] { error make { msg: "oh no!" @@ -69,7 +70,7 @@ fn fancy_default_errors() { assert_eq!( actual.err, - "Error: \n \u{1b}[31m×\u{1b}[0m oh no!\n ╭─[\u{1b}[36;1;4mline1:1:13\u{1b}[0m]\n \u{1b}[2m1\u{1b}[0m │ force_error \"My error\"\n · \u{1b}[35;1m ─────┬────\u{1b}[0m\n · \u{1b}[35;1m╰── \u{1b}[35;1mhere's the error\u{1b}[0m\u{1b}[0m\n ╰────\n\n" + "Error: \n \u{1b}[31m×\u{1b}[0m oh no!\n ╭─[\u{1b}[36;1;4mline2:1:13\u{1b}[0m]\n \u{1b}[2m1\u{1b}[0m │ force_error \"My error\"\n · \u{1b}[35;1m ─────┬────\u{1b}[0m\n · \u{1b}[35;1m╰── \u{1b}[35;1mhere's the error\u{1b}[0m\u{1b}[0m\n ╰────\n\n" ); }