Fix reject regression (#14931)

This PR solves the regression introduced by #14622 (sorry about that).
It also adds a test to cover the regression.
Closes #14929.
This commit is contained in:
Renan Ribeiro
2025-01-27 20:23:44 -03:00
committed by GitHub
parent c0b4d19761
commit a2705f9eb5
2 changed files with 14 additions and 1 deletions

View File

@ -178,3 +178,10 @@ fn test_ignore_errors_flag_var() {
nu!("let arg = [5 c]; [[a, b]; [1, 2], [3, 4], [5, 6]] | reject ...$arg -i | to nuon");
assert_eq!(actual.out, "[[a, b]; [1, 2], [3, 4], [5, 6]]");
}
#[test]
fn test_works_with_integer_path_and_stream() {
let actual = nu!("[[N u s h e l l]] | flatten | reject 1 | to nuon");
assert_eq!(actual.out, "[N, s, h, e, l, l]");
}