From 644435bfe3672b836c634d3369218c82ea9b79a4 Mon Sep 17 00:00:00 2001 From: JT <547158+jntrnr@users.noreply.github.com> Date: Wed, 16 Feb 2022 04:59:44 -0500 Subject: [PATCH] Move and enable with-env test (#4489) --- crates/nu-command/tests/commands/with_env.rs | 12 ------------ src/tests/test_engine.rs | 8 ++++++++ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/crates/nu-command/tests/commands/with_env.rs b/crates/nu-command/tests/commands/with_env.rs index 4f6480bdb6..ca94c2b33d 100644 --- a/crates/nu-command/tests/commands/with_env.rs +++ b/crates/nu-command/tests/commands/with_env.rs @@ -55,18 +55,6 @@ fn with_env_and_shorthand_same_result() { assert_eq!(actual_shorthand.out, actual_normal.out); } -// FIXME: jt: needs more work -#[ignore] -#[test] -fn with_env_shorthand_nested_quotes() { - let actual = nu!( - cwd: "tests/fixtures/formats", - "FOO='-arg \"hello world\"' echo $env | get FOO" - ); - - assert_eq!(actual.out, "-arg \"hello world\""); -} - // FIXME: jt: needs more work #[ignore] #[test] diff --git a/src/tests/test_engine.rs b/src/tests/test_engine.rs index 5663526c6d..f569e32868 100644 --- a/src/tests/test_engine.rs +++ b/src/tests/test_engine.rs @@ -243,3 +243,11 @@ fn reduce_spans() -> TestResult { "right here", ) } + +#[test] +fn with_env_shorthand_nested_quotes() -> TestResult { + run_test( + r#"FOO='-arg "hello world"' echo $env | get FOO"#, + "-arg \"hello world\"", + ) +}