mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 07:16:05 +02:00
Try to make argument with quotes for external command better (#6420)
* fix arg quote for external * adjust comment
This commit is contained in:
@ -138,6 +138,36 @@ 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'"
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual.out, "foo=bar 'hi'");
|
||||
})
|
||||
}
|
||||
|
||||
#[cfg(not(windows))]
|
||||
#[test]
|
||||
fn external_arg_with_long_flag_value_quoted() {
|
||||
Playground::setup("external failed command with semicolon", |dirs, _| {
|
||||
let actual = nu!(
|
||||
cwd: dirs.test(), pipeline(
|
||||
r#"
|
||||
^echo --foo='bar'
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual.out, "--foo=bar");
|
||||
})
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
#[test]
|
||||
fn explicit_glob_windows() {
|
||||
|
Reference in New Issue
Block a user