coreutils/tests/bonsai/mm.sh

20 lines
573 B
Bash
Executable File

#!/bin/sh
# Copyright (c) 2024 Emma Tebibyte <emma@tebibyte.media>
# SPDX-License-Identifier: FSFAP
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice and this
# notice are preserved. This file is offered as-is, without any warranty.
. tests/bonsai/test_env
exec 3>&1
! mm -h
# mm(1) will error if positional arguments are given without -i or -o
! mm argument
# check if stderr is empty upon specifying -e
! "$BIN/strcmp" "$(printf 'test\n' | mm -i - -e 2>&1 1>&3)" ''