forked from extern/nushell
Add support to run external command with string evaluation (#3611)
This commit is contained in:
@ -68,6 +68,18 @@ fn correctly_escape_external_arguments() {
|
||||
assert_eq!(actual.out, "$0");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn execute_binary_in_string() {
|
||||
let actual = nu!(
|
||||
cwd: ".",
|
||||
r#"
|
||||
let cmd = echo
|
||||
^$"($cmd)" '$0'
|
||||
"#);
|
||||
|
||||
assert_eq!(actual.out, "$0");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn redirects_custom_command_external() {
|
||||
let actual = nu!(cwd: ".", r#"def foo [] { nu --testbin cococo foo bar }; foo | str length "#);
|
||||
|
Reference in New Issue
Block a user