remove comment and add test for averaging integers

This commit is contained in:
notryanb@gmail.com
2019-10-14 17:55:42 -04:00
parent 8262c2dd33
commit 43fbf4345d
2 changed files with 32 additions and 20 deletions

View File

@ -579,6 +579,21 @@ fn can_sum() {
assert_eq!(actual, "203")
}
#[test]
fn can_average() {
let actual = nu!(
cwd: "tests/fixtures/formats", h::pipeline(
r#"
open sgml_description.json
| get glossary.GlossDiv.GlossList.GlossEntry.Sections
| average
| echo $it
"#
));
assert_eq!(actual, "101.5000000000000")
}
#[test]
fn can_filter_by_unit_size_comparison() {
let actual = nu!(