Fix clippy lints (#2651)

This commit is contained in:
Jonathan Turner
2020-10-09 10:47:51 +13:00
committed by GitHub
parent 152ba32eb7
commit 1159d3365a
9 changed files with 32 additions and 70 deletions

View File

@ -0,0 +1,32 @@
use nu_test_support::fs::Stub::FileWithContentToBeTrimmed;
use nu_test_support::playground::Playground;
use nu_test_support::{nu, pipeline};
#[test]
fn rows() {
Playground::setup("keep_test_1", |dirs, sandbox| {
sandbox.with_files(vec![FileWithContentToBeTrimmed(
"caballeros.csv",
r#"
name,lucky_code
Andrés,1
Jonathan,1
Jason,2
Yehuda,1
"#,
)]);
let actual = nu!(
cwd: dirs.test(), pipeline(
r#"
open caballeros.csv
| keep 3
| get lucky_code
| math sum
| echo $it
"#
));
assert_eq!(actual.out, "4");
})
}