forked from bonsai/harakit
tests: bonsai/peek.mk
This commit is contained in:
parent
1037e32e6e
commit
87c9e29932
24
tests/bonsai/peek.mk
Executable file
24
tests/bonsai/peek.mk
Executable file
@ -0,0 +1,24 @@
|
||||
# Copyright (c) 2024 DTB <trinity@trinity.moe>
|
||||
# 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.
|
||||
|
||||
# Testing peek is hard as it requires visual confirmation that text isn't being
|
||||
# echoed. These tests don't go that far but are a start, and have already
|
||||
# caught a bug in -i behavior.
|
||||
|
||||
.PHONY: peek_tests
|
||||
peek_tests: peek_help peek_stdio
|
||||
|
||||
.PHONY: peek_help
|
||||
peek_help: $(BIN)/peek
|
||||
! $(BIN)/peek -h
|
||||
|
||||
.PHONY: peek_stdio
|
||||
# Test peek -i
|
||||
peek_stdio: $(BIN)/peek
|
||||
printf 'Test.\n' \
|
||||
| $(BIN)/peek -i \
|
||||
| xargs test 'Test.' =
|
Loading…
Reference in New Issue
Block a user