fish-shell/tests/checks/print-help.fish
Fabian Boehm 04da7043a6 tests: Remove skipped tests hack for Cmake < 3.9.0
We require 3.19

This also makes skipped tests visible, which showed that the
print-help test was never run because the REQUIRES line was off.

In sh-mode, bash's `command -v` returns true if *all* commands exist.
2024-06-11 16:55:11 +02:00

17 lines
556 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 | grep -q "and - conditionally execute a command"
echo $status
#CHECK: 0