tests: Override __fish_print_help

This effectively disables "--help", replacing it with just a stand-in
string.

The upshot is that it makes the test suite immune to whether or not it
can find the documentation - until now it needed to *not* find it,
which is weird.

(also it saves some useless lines)

Fixes #11270
This commit is contained in:
Fabian Boehm
2025-03-13 18:11:55 +01:00
parent 7224776f80
commit 6627d403d3
10 changed files with 19 additions and 39 deletions

View File

@@ -86,9 +86,7 @@ $fish -c 'begin --notanoption; end'
# CHECKERR: ^~~~~~~~~~~~^
$fish -c 'begin --help'
# CHECKERR: fish: begin: missing man page
# CHECKERR: Documentation may not be installed.
# CHECKERR: `help begin` will show an online version
# CHECKERR: Documentation for begin
$fish -c 'echo (for status in foo; end)'
# CHECKERR: fish: for: status: cannot overwrite read-only variable