mirror of
https://github.com/nushell/nushell
synced 2024-12-25 12:33:17 +00:00
add a test to make sure "nothing" shows up as "nothing" in help (#9941)
related to - https://github.com/nushell/nushell/pull/9935 # Description this PR just adds a test to make sure type annotations in `def`s show as `nothing` in the help pages of commands. # User-Facing Changes # Tests + Formatting adds a new test `nothing_type_annotation`. # After Submitting
This commit is contained in:
parent
56ed1eb807
commit
b964347895
1 changed files with 11 additions and 0 deletions
|
@ -380,3 +380,14 @@ fn help_alias_before_command() {
|
|||
|
||||
assert!(actual.out.contains("Alias"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn nothing_type_annotation() {
|
||||
let actual = nu!(pipeline(
|
||||
"
|
||||
def foo []: nothing -> nothing {};
|
||||
help commands | where name == foo | get input_output.0.output.0
|
||||
"
|
||||
));
|
||||
assert_eq!(actual.out, "nothing");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue