bonsix/tests/bonsai/mm.mk

28 lines
781 B
Makefile
Raw Normal View History

2024-08-02 17:29:30 -06:00
# Copyright (c) 2024 E$(NAME)a Tebibyte <e$(NAME)a@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.
NAME = mm
TARGET = $(NAME)_tests
BINARY = $(BIN)/$(NAME)
.PHONY: mm_tests
mm_tests: mm_args mm_help mm_stderr
.PHONY: mm_args
# mm(1) will error if positional arguments are given without -i or -o
mm_args: $(BIN)/mm
! $(BIN)/mm argument
.PHONY: mm_help
mm_help: $(BIN)/mm
! $(BIN)/mm -h
.PHONY: mm_stderr
# check if stderr is empty upon specifying -e
mm_stderr: $(BIN)/mm
2024-08-09 23:50:31 -06:00
! test "$$(printf 'test\n' | $(BIN)/mm -e 2>&1 >/dev/null)" = "test"