mirror of
https://github.com/nushell/nushell.git
synced 2025-08-15 23:28:19 +02:00
Stream results of drop command (#2114)
* Stream results of drop command * When the amount of rows to drop is equal to or greaten than the size of the table, output nothing
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
use nu_test_support::nu;
|
||||
use nu_test_support::{nu, pipeline};
|
||||
|
||||
#[test]
|
||||
fn drop_rows() {
|
||||
@ -9,3 +9,15 @@ fn drop_rows() {
|
||||
|
||||
assert_eq!(actual.out, "3");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn drop_more_rows_than_table_has() {
|
||||
let actual = nu!(
|
||||
cwd: ".", pipeline(
|
||||
r#"
|
||||
date | drop 50 | count
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual.out, "0");
|
||||
}
|
||||
|
Reference in New Issue
Block a user