mirror of
https://github.com/nushell/nushell.git
synced 2025-08-17 03:23:34 +02:00
Fix column count to not break on empty tables (#2374)
This commit is contained in:
@ -11,3 +11,15 @@ fn count_columns_in_cal_table() {
|
||||
|
||||
assert_eq!(actual.out, "7");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn count_columns_no_rows() {
|
||||
let actual = nu!(
|
||||
cwd: ".", pipeline(
|
||||
r#"
|
||||
echo [] | count -c
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual.out, "0");
|
||||
}
|
||||
|
Reference in New Issue
Block a user