mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
Fix __fish_describe_command integration test under macOS
__fish_apropos is a huge hack under macOS and it seems that it's either broken or man pages are missing/not indexed under CI. In all cases, hard-code the results of __fish_describe_command to test the integration machinery specifically and get the test to pass under macOS CI.
This commit is contained in:
parent
dd7d537d90
commit
b5f5fa98bf
1 changed files with 7 additions and 2 deletions
|
@ -605,7 +605,12 @@ complete -C'complete_long_option -ao'
|
|||
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.
|
||||
# Override __fish_describe_command to prevent missing man pages or broken __fish_apropos on macOS
|
||||
# from failing this test. (TODO: Test the latter separately.)
|
||||
function __fish_describe_command
|
||||
echo -e "whereis\twhere is it"
|
||||
echo -e "whoami\twho am i"
|
||||
echo -e "which\which is it"
|
||||
end
|
||||
test (count (complete -C"wh" | string match -rv "\tcommand|^while")) -gt 0 && echo "found" || echo "fail"
|
||||
# CHECK: found
|
||||
|
|
Loading…
Reference in a new issue