diff --git a/crates/nu-command/tests/commands/where_.rs b/crates/nu-command/tests/commands/where_.rs index 837b715c3f..6ce540635a 100644 --- a/crates/nu-command/tests/commands/where_.rs +++ b/crates/nu-command/tests/commands/where_.rs @@ -28,6 +28,12 @@ fn where_inside_block_works() { assert_eq!(actual.out, "closure"); } +#[test] +fn it_inside_complex_subexpression() { + let actual = nu!(r#"1..10 | where [($it * $it)].0 > 40 | to nuon"#); + assert_eq!(actual.out, r#"[7, 8, 9, 10]"#) +} + #[test] fn filters_with_0_arity_block() { let actual = nu!("[1 2 3 4] | where {|| $in < 3 } | to nuon");