mirror of
https://github.com/nushell/nushell
synced 2024-11-17 18:27:57 +00:00
6b2327f231
* fix case where parent_name was {nu, term} and possibly others in the future by doing an extra test first to see if if the *parent_name key actually exists in cmap * update with help generate_docs testing
31 lines
665 B
Rust
31 lines
665 B
Rust
use nu_test_support::{nu, pipeline};
|
|
|
|
#[test]
|
|
fn help_commands_count() {
|
|
let actual = nu!(
|
|
cwd: ".", pipeline(
|
|
r#"
|
|
help commands | count
|
|
"#
|
|
));
|
|
|
|
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_count() {
|
|
let actual = nu!(
|
|
cwd: ".", pipeline(
|
|
r#"
|
|
help generate_docs | flatten | count
|
|
"#
|
|
));
|
|
|
|
let output = actual.out;
|
|
let output_int: i32 = output.parse().unwrap();
|
|
let is_positive = output_int.is_positive();
|
|
assert!(is_positive);
|
|
}
|