mirror of
https://github.com/nushell/nushell
synced 2025-01-07 10:49:03 +00:00
12 lines
256 B
Rust
12 lines
256 B
Rust
|
use nu_test_support::nu;
|
||
|
|
||
|
#[test]
|
||
|
fn drop_rows() {
|
||
|
let actual = nu!(
|
||
|
cwd: "tests/fixtures/formats",
|
||
|
r#"echo '[{"foo": 3}, {"foo": 8}, {"foo": 4}]' | from-json | drop 2 | get foo | sum | echo $it"#
|
||
|
);
|
||
|
|
||
|
assert_eq!(actual, "3");
|
||
|
}
|