diff --git a/crates/nu-command/tests/commands/each.rs b/crates/nu-command/tests/commands/each.rs index f8c89ebf66..fe30a8acbf 100644 --- a/crates/nu-command/tests/commands/each.rs +++ b/crates/nu-command/tests/commands/each.rs @@ -1,13 +1,11 @@ use nu_test_support::{nu, pipeline}; -// FIXME: jt: needs more work -#[ignore] #[test] fn each_works_separately() { let actual = nu!( cwd: "tests/fixtures/formats", pipeline( r#" - echo [1 2 3] | each { echo $it 10 | math sum } | to json + echo [1 2 3] | each { echo $it 10 | math sum } | to json -r "# )); @@ -56,18 +54,16 @@ fn each_window_stride() { assert_eq!(actual.out, "[[1,2,3],[3,4,5]]"); } -// FIXME: jt: needs more work -#[ignore] #[test] fn each_no_args_in_block() { let actual = nu!( cwd: "tests/fixtures/formats", pipeline( r#" - echo [[foo bar]; [a b] [c d] [e f]] | each { to json } | nth 1 | str collect + echo [[foo bar]; [a b] [c d] [e f]] | each {|i| $i | to json -r } | nth 1 "# )); - assert_eq!(actual.out, r#"{"foo":"c","bar":"d"}"#); + assert_eq!(actual.out, r#"{"foo": "c","bar": "d"}"#); } #[test] diff --git a/crates/nu-command/tests/commands/math/mod.rs b/crates/nu-command/tests/commands/math/mod.rs index 23193d83d0..01a60556ab 100644 --- a/crates/nu-command/tests/commands/math/mod.rs +++ b/crates/nu-command/tests/commands/math/mod.rs @@ -259,30 +259,26 @@ fn compound_comparison2() { assert_eq!(actual.out, "true"); } -// FIXME: jt: needs more work -#[ignore] #[test] fn compound_where() { let actual = nu!( cwd: "tests/fixtures/formats", pipeline( r#" - echo '[{"a": 1, "b": 1}, {"a": 2, "b": 1}, {"a": 2, "b": 2}]' | from json | where a == 2 && b == 1 | to json + echo '[{"a": 1, "b": 1}, {"a": 2, "b": 1}, {"a": 2, "b": 2}]' | from json | where a == 2 && b == 1 | to json -r "# )); - assert_eq!(actual.out, r#"{"a":2,"b":1}"#); + assert_eq!(actual.out, r#"[{"a": 2,"b": 1}]"#); } -// FIXME: jt: needs more work -#[ignore] #[test] fn compound_where_paren() { let actual = nu!( cwd: "tests/fixtures/formats", pipeline( r#" - echo '[{"a": 1, "b": 1}, {"a": 2, "b": 1}, {"a": 2, "b": 2}]' | from json | where ($it.a == 2 && $it.b == 1) || $it.b == 2 | to json + echo '[{"a": 1, "b": 1}, {"a": 2, "b": 1}, {"a": 2, "b": 2}]' | from json | where ($it.a == 2 && $it.b == 1) || $it.b == 2 | to json -r "# )); - assert_eq!(actual.out, r#"[{"a":2,"b":1},{"a":2,"b":2}]"#); + assert_eq!(actual.out, r#"[{"a": 2,"b": 1},{"a": 2,"b": 2}]"#); }