mirror of
https://github.com/nushell/nushell.git
synced 2024-12-02 13:24:30 +01:00
53a6e9f0bd
* Convert sum command into subcommand of the math command * Add bullet points to math.md documentation
12 lines
265 B
Rust
12 lines
265 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 | math sum | echo $it"#
|
|
);
|
|
|
|
assert_eq!(actual.out, "3");
|
|
}
|