mirror of
https://github.com/nushell/nushell.git
synced 2024-12-22 07:02:19 +01:00
updated error test to enforce ansi colors
This commit is contained in:
parent
39efa034b9
commit
f32828625e
@ -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"
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user