mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-30 09:31:15 -03:00
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
17 lines
542 B
Fish
17 lines
542 B
Fish
# RUN: %fish %s
|
|
# Test redirecting builtin help with a pipe
|
|
# REQUIRES: command -v mandoc || command -v nroff
|
|
|
|
set -lx __fish_data_dir (mktemp -d)
|
|
mkdir -p $__fish_data_dir/man/man1
|
|
# Create $__fish_data_dir/man/man1/and.1
|
|
echo '.\" Test manpage for and (not real).
|
|
.TH "AND" "1" "Feb 02, 2024" "3.7" "fish-shell"
|
|
.SH NAME
|
|
and \- conditionally execute a command' >$__fish_data_dir/man/man1/and.1
|
|
|
|
# help should be redirected to grep instead of appearing on STDOUT
|
|
builtin and --help 2>| grep -q "Documentation for and"
|
|
echo $status
|
|
#CHECK: 0
|