Skip to content

Commit

Permalink
Add regression test for command completion descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
mqudsi committed Jun 28, 2024
1 parent 0adebdf commit dd7d537
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/checks/complete.fish
Original file line number Diff line number Diff line change
Expand Up @@ -603,3 +603,9 @@ complete -C'complete_long_option -ao'
# CHECK: -an-old-option
# But only if the user typed a dash
complete -C'complete_long_option lo'

# Check that descriptions are correctly generated for commands.
# We expect to find at least one `wh...` command with a manpage/apropos description, such as
# `whoami`, `whereis`, or `which`. Filter out keywords & default/generic completions to test.
test (count (complete -C"wh" | string match -rv "\tcommand|^while")) -gt 0 && echo "found" || echo "fail"
# CHECK: found

0 comments on commit dd7d537

Please sign in to comment.