redirect test

This commit is contained in:
Devyn Cairns 2024-07-01 13:47:11 -07:00
parent e2510d6c0d
commit 89d7b2237c
No known key found for this signature in database
2 changed files with 9 additions and 1 deletions

View File

@ -701,7 +701,7 @@ fn collect(data: PipelineData, fallback_span: Span) -> Result<PipelineData, Shel
Ok(PipelineData::Value(value, metadata))
}
/// Set up an [`Redirection`] from a [`RedirectMode`]
/// Set up a [`Redirection`] from a [`RedirectMode`]
fn eval_redirection(
ctx: &mut EvalContext<'_>,
mode: &RedirectMode,

View File

@ -198,6 +198,14 @@ fn external_call_redirect_pipe() {
)
}
#[test]
fn external_call_redirect_capture() {
test_eval(
"echo (nu --testbin cococo foo=bar baz) | str upcase",
Eq("FOO=BAR BAZ"),
)
}
#[test]
fn external_call_redirect_file() {
test_eval(