2023-07-17 18:43:51 +02:00
|
|
|
use nu_test_support::nu;
|
2020-08-16 05:16:49 +02:00
|
|
|
|
|
|
|
#[test]
|
2021-03-13 22:46:40 +01:00
|
|
|
fn length_columns_in_cal_table() {
|
2023-07-17 18:43:51 +02:00
|
|
|
let actual = nu!("cal | length -c");
|
2020-08-16 05:16:49 +02:00
|
|
|
|
|
|
|
assert_eq!(actual.out, "7");
|
|
|
|
}
|
2020-08-19 04:16:35 +02:00
|
|
|
|
|
|
|
#[test]
|
2021-03-13 22:46:40 +01:00
|
|
|
fn length_columns_no_rows() {
|
2023-07-17 18:43:51 +02:00
|
|
|
let actual = nu!("echo [] | length -c");
|
2020-08-19 04:16:35 +02:00
|
|
|
|
|
|
|
assert_eq!(actual.out, "0");
|
|
|
|
}
|