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"); }