From f11571c55d2a374558e3dd538550847b40a0ee87 Mon Sep 17 00:00:00 2001 From: WindSoilder Date: Tue, 19 Nov 2024 21:14:47 +0800 Subject: [PATCH] adjust tests --- crates/nu-command/tests/commands/do_.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/nu-command/tests/commands/do_.rs b/crates/nu-command/tests/commands/do_.rs index bbce5648db..1a2258cf9c 100644 --- a/crates/nu-command/tests/commands/do_.rs +++ b/crates/nu-command/tests/commands/do_.rs @@ -44,7 +44,7 @@ fn do_with_semicolon_break_on_failed_external() { fn ignore_shell_errors_works_for_external_with_semicolon() { let actual = nu!(r#"do -s { open asdfasdf.txt }; "text""#); - assert_eq!(actual.err, ""); + assert!(actual.err.contains("Deprecated option")); assert_eq!(actual.out, "text"); } @@ -52,7 +52,7 @@ fn ignore_shell_errors_works_for_external_with_semicolon() { fn ignore_program_errors_works_for_external_with_semicolon() { let actual = nu!(r#"do -p { nu -n -c 'exit 1' }; "text""#); - assert_eq!(actual.err, ""); + assert!(actual.err.contains("Deprecated option")); assert_eq!(actual.out, "text"); } @@ -80,6 +80,7 @@ fn run_closure_with_it_using() { #[test] fn waits_for_external() { let actual = nu!(r#"do -p { nu -c 'sleep 1sec; print before; exit 1'}; print after"#); - assert!(actual.err.is_empty()); + + assert!(actual.err.contains("Deprecated option")); assert_eq!(actual.out, "beforeafter"); }