mirror of
https://github.com/nushell/nushell.git
synced 2025-08-14 06:28:41 +02:00
* Fix "index out of bounds" when input to group-by is empty #4369 * Fix formatting #4369 * Adds test for empty input Co-authored-by: Ray Henry <ray.henry@thermofisher.com>
This commit is contained in:
@ -97,3 +97,17 @@ fn errors_if_block_given_evaluates_more_than_one_row() {
|
||||
assert!(actual.err.contains("Unknown column"));
|
||||
})
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn errors_if_input_empty() {
|
||||
Playground::setup("group_by_empty_test", |dirs, _sandbox| {
|
||||
let actual = nu!(
|
||||
cwd: dirs.test(), pipeline(
|
||||
r#"
|
||||
group-by date
|
||||
"#
|
||||
));
|
||||
|
||||
assert!(actual.err.contains("expected table from pipeline"));
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user