Fix buffering in lines command (#2111)

This commit is contained in:
Jonathan Turner
2020-07-04 17:20:58 -07:00
committed by GitHub
parent 04120e00e4
commit bbc5a28fe9
3 changed files with 40 additions and 37 deletions

View File

@ -19,3 +19,18 @@ fn lines() {
assert_eq!(actual.out, "rustyline");
}
#[test]
fn lines_proper_buffering() {
let actual = nu!(
cwd: "tests/fixtures/formats", pipeline(
r#"
open lines_test.txt -r
| lines
| str length
| to json
"#
));
assert_eq!(actual.out, "[8194,4]");
}