mirror of
https://github.com/nushell/nushell
synced 2024-11-17 10:17:57 +00:00
c13fe83784
* update docs to refer to length instead of count * rename count to length * change all occurrences of 'count' to 'length' in tests * format length command
31 lines
669 B
Rust
31 lines
669 B
Rust
use nu_test_support::{nu, pipeline};
|
|
|
|
#[test]
|
|
fn help_commands_length() {
|
|
let actual = nu!(
|
|
cwd: ".", pipeline(
|
|
r#"
|
|
help commands | length
|
|
"#
|
|
));
|
|
|
|
let output = actual.out;
|
|
let output_int: i32 = output.parse().unwrap();
|
|
let is_positive = output_int.is_positive();
|
|
assert!(is_positive);
|
|
}
|
|
|
|
#[test]
|
|
fn help_generate_docs_length() {
|
|
let actual = nu!(
|
|
cwd: ".", pipeline(
|
|
r#"
|
|
help generate_docs | flatten | length
|
|
"#
|
|
));
|
|
|
|
let output = actual.out;
|
|
let output_int: i32 = output.parse().unwrap();
|
|
let is_positive = output_int.is_positive();
|
|
assert!(is_positive);
|
|
}
|