mirror of
https://github.com/nushell/nushell
synced 2025-01-26 03:45:19 +00:00
cargo fmt
This commit is contained in:
parent
097d9f8053
commit
dda1e81d5c
1 changed files with 9 additions and 7 deletions
|
@ -157,13 +157,15 @@ fn generate_allows_pipeline_input() {
|
|||
|
||||
#[test]
|
||||
fn generate_with_input_is_streaming() {
|
||||
let actual = nu!(pipeline(r#"
|
||||
1..10
|
||||
| each {|x| print -en $x; $x}
|
||||
| generate {|sum=0| let sum = $in + $sum; {out: $sum, next: $sum}}
|
||||
| first 5
|
||||
| to nuon
|
||||
"#));
|
||||
let actual = nu!(pipeline(
|
||||
r#"
|
||||
1..10
|
||||
| each {|x| print -en $x; $x}
|
||||
| generate {|sum=0| let sum = $in + $sum; {out: $sum, next: $sum}}
|
||||
| first 5
|
||||
| to nuon
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual.out, "[1, 3, 6, 10, 15]");
|
||||
assert_eq!(actual.err, "12345");
|
||||
|
|
Loading…
Reference in a new issue