escape external args (#6560)

This commit is contained in:
WindSoilder
2022-09-17 19:07:45 +08:00
committed by GitHub
parent e7bf89b311
commit 5491634dda
2 changed files with 21 additions and 1 deletions

View File

@ -186,6 +186,20 @@ fn external_arg_with_variable_name() {
})
}
#[test]
fn external_command_escape_args() {
Playground::setup("external failed command with semicolon", |dirs, _| {
let actual = nu!(
cwd: dirs.test(), pipeline(
r#"
^echo "\"abcd"
"#
));
assert_eq!(actual.out, r#""abcd"#);
})
}
#[cfg(windows)]
#[test]
fn explicit_glob_windows() {