mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 14:40:06 +02:00
Oops, match semantics of each group/window (#967)
This commit is contained in:
@ -12,42 +12,36 @@ fn each_works_separately() {
|
||||
assert_eq!(actual.out, "[11,12,13]");
|
||||
}
|
||||
|
||||
// FIXME: jt: needs more work
|
||||
#[ignore]
|
||||
#[test]
|
||||
fn each_group_works() {
|
||||
let actual = nu!(
|
||||
cwd: "tests/fixtures/formats", pipeline(
|
||||
r#"
|
||||
echo [1 2 3 4 5 6] | each group 3 { $it } | to json
|
||||
echo [1 2 3 4 5 6] | each group 3 { $it } | to json --raw
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual.out, "[[1,2,3],[4,5,6]]");
|
||||
}
|
||||
|
||||
// FIXME: jt: needs more work
|
||||
#[ignore]
|
||||
#[test]
|
||||
fn each_window() {
|
||||
let actual = nu!(
|
||||
cwd: "tests/fixtures/formats", pipeline(
|
||||
r#"
|
||||
echo [1 2 3 4] | each window 3 { $it } | to json
|
||||
echo [1 2 3 4] | each window 3 { $it } | to json --raw
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual.out, "[[1,2,3],[2,3,4]]");
|
||||
}
|
||||
|
||||
// FIXME: jt: needs more work
|
||||
#[ignore]
|
||||
#[test]
|
||||
fn each_window_stride() {
|
||||
let actual = nu!(
|
||||
cwd: "tests/fixtures/formats", pipeline(
|
||||
r#"
|
||||
echo [1 2 3 4 5 6] | each window 3 -s 2 { echo $it } | to json
|
||||
echo [1 2 3 4 5 6] | each window 3 -s 2 { echo $it } | to json --raw
|
||||
"#
|
||||
));
|
||||
|
||||
|
Reference in New Issue
Block a user