remove -s, -p in do (#15456)

# Description
Closes #15450

# User-Facing Changes
do can't use `-s`, `-p` after this pr

# Tests + Formatting
Removed 3 tests.

# After Submitting
NaN
This commit is contained in:
Wind
2025-04-01 20:17:05 +08:00
committed by GitHub
parent f39e5b3f37
commit 43f9ec295f
2 changed files with 3 additions and 67 deletions

View File

@ -40,22 +40,6 @@ fn do_with_semicolon_break_on_failed_external() {
assert_eq!(actual.out, "");
}
#[test]
fn ignore_shell_errors_works_for_external_with_semicolon() {
let actual = nu!(r#"do -s { open asdfasdf.txt }; "text""#);
assert!(actual.err.contains("Deprecated option"));
assert_eq!(actual.out, "text");
}
#[test]
fn ignore_program_errors_works_for_external_with_semicolon() {
let actual = nu!(r#"do -p { nu -n -c 'exit 1' }; "text""#);
assert!(actual.err.contains("Deprecated option"));
assert_eq!(actual.out, "text");
}
#[test]
fn ignore_error_should_work_for_external_command() {
let actual = nu!(r#"do -i { nu --testbin fail asdf }; echo post"#);
@ -76,11 +60,3 @@ fn run_closure_with_it_using() {
assert!(actual.err.is_empty());
assert_eq!(actual.out, "3");
}
#[test]
fn waits_for_external() {
let actual = nu!(r#"do -p { nu -c 'sleep 1sec; print before; exit 1'}; print after"#);
assert!(actual.err.contains("Deprecated option"));
assert_eq!(actual.out, "beforeafter");
}