mirror of
https://github.com/nushell/nushell.git
synced 2024-12-26 08:59:12 +01:00
6951fb440c
* Remove it-expansion, take 2 * Cleanup * silly update to test CI
24 lines
461 B
Rust
24 lines
461 B
Rust
use nu_test_support::{nu, pipeline};
|
|
|
|
#[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 | math sum "#
|
|
);
|
|
|
|
assert_eq!(actual.out, "3");
|
|
}
|
|
|
|
#[test]
|
|
fn drop_more_rows_than_table_has() {
|
|
let actual = nu!(
|
|
cwd: ".", pipeline(
|
|
r#"
|
|
date | drop 50 | count
|
|
"#
|
|
));
|
|
|
|
assert_eq!(actual.out, "0");
|
|
}
|