diff --git a/crates/nu-command/tests/commands/def.rs b/crates/nu-command/tests/commands/def.rs index 67e9c82d6e..c39e89ada2 100644 --- a/crates/nu-command/tests/commands/def.rs +++ b/crates/nu-command/tests/commands/def.rs @@ -197,7 +197,7 @@ fn def_wrapped_with_block() { #[test] fn def_wrapped_from_module() { let actual = nu!(r#"module spam { - export def --wrapped my-echo [...rest] { ^echo ...$rest } + export def --wrapped my-echo [...rest] { nu --testbin cococo ...$rest } } use spam diff --git a/crates/nu-command/tests/commands/run_external.rs b/crates/nu-command/tests/commands/run_external.rs index 638d564974..69ebd0473d 100644 --- a/crates/nu-command/tests/commands/run_external.rs +++ b/crates/nu-command/tests/commands/run_external.rs @@ -139,14 +139,13 @@ fn failed_command_with_semicolon_will_not_execute_following_cmds() { }) } -#[cfg(not(windows))] #[test] fn external_args_with_quoted() { Playground::setup("external failed command with semicolon", |dirs, _| { let actual = nu!( cwd: dirs.test(), pipeline( r#" - ^echo "foo=bar 'hi'" + nu --testbin cococo "foo=bar 'hi'" "# )); @@ -187,14 +186,13 @@ fn external_arg_with_variable_name() { }) } -#[cfg(not(windows))] #[test] fn external_command_escape_args() { Playground::setup("external failed command with semicolon", |dirs, _| { let actual = nu!( cwd: dirs.test(), pipeline( r#" - ^echo "\"abcd" + nu --testbin cococo "\"abcd" "# )); @@ -308,13 +306,12 @@ fn can_run_batch_files_without_bat_extension() { ); } -#[cfg(windows)] #[test] fn quotes_trimmed_when_shelling_out() { // regression test for a bug where we weren't trimming quotes around string args before shelling out to cmd.exe let actual = nu!(pipeline( r#" - ^echo "foo" + nu --testbin cococo "foo" "# )); diff --git a/tests/shell/pipeline/commands/external.rs b/tests/shell/pipeline/commands/external.rs index 3672c61817..b53ac0c8c4 100644 --- a/tests/shell/pipeline/commands/external.rs +++ b/tests/shell/pipeline/commands/external.rs @@ -85,7 +85,7 @@ fn execute_binary_in_string() { #[test] fn single_quote_dollar_external() { - let actual = nu!("let author = 'JT'; ^echo $'foo=($author)'"); + let actual = nu!("let author = 'JT'; nu --testbin cococo $'foo=($author)'"); assert_eq!(actual.out, "foo=JT"); } @@ -493,18 +493,16 @@ mod external_command_arguments { ) } - #[cfg(not(windows))] #[test] fn semicolons_are_sanitized_before_passing_to_subshell() { - let actual = nu!("^echo \"a;b\""); + let actual = nu!("nu --testbin cococo \"a;b\""); assert_eq!(actual.out, "a;b"); } - #[cfg(not(windows))] #[test] fn ampersands_are_sanitized_before_passing_to_subshell() { - let actual = nu!("^echo \"a&b\""); + let actual = nu!("nu --testbin cococo \"a&b\""); assert_eq!(actual.out, "a&b"); }