Convert sum command into subcommand of the math command (#2004)

* Convert sum command into subcommand of the math command

* Add bullet points to math.md documentation
This commit is contained in:
Joseph T. Lyons
2020-06-18 22:02:01 -04:00
committed by GitHub
parent 5f9de80d9b
commit 53a6e9f0bd
26 changed files with 175 additions and 143 deletions

View File

@ -4,7 +4,7 @@ use nu_test_support::nu;
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"#
r#"echo '[{"foo": 3}, {"foo": 8}, {"foo": 4}]' | from json | drop 2 | get foo | math sum | echo $it"#
);
assert_eq!(actual.out, "3");