bonsix/tests/bonsai/npc.mk

43 lines
1.1 KiB
Makefile
Raw Normal View History

#!/bin/sh
# Copyright (c) 2024 DTB <trinity@trinity.moe>
2024-08-02 17:29:30 -06:00
# 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.
2024-08-02 17:29:30 -06:00
.PRAGMA: command_comment
2024-08-02 17:29:30 -06:00
.PHONY: npc_tests
npc_tests: npc_args npc_help
2024-08-02 17:29:30 -06:00
.PHONY: npc_args
# arg parsing
2024-08-02 17:29:30 -06:00
npc_args:
$(BIN)/npc -e </dev/null
$(BIN)/npc -t </dev/null
$(BIN)/npc -et </dev/null
! $(BIN)/npc -et 5 </dev/null
.PHONY: npc_help
npc_help: $(BIN)/npc
! $(BIN)/npc -h
#i=0; while "$BIN"/intcmp -l $i 178; do
# printf '\\%s\\n' "$i" \
# | xargs -I fmt printf fmt
#
# # simulate octal
# i="$(printf '1 + %s\n' "$i" | bc)"
# printf '%s\n' "$i" \
# | tail -c 1 \
# | xargs "$BIN"/intcmp -e 8 \
# && i="$(printf '2 + %s\n' "$i" | bc)"
# printf '%s\n' "$i" \
# | tail -c 2 \
# | dd count=1 bs=1 2>/dev/null \
# | xargs "$BIN"/intcmp -e 8 \
# && i="$(printf '20 + %s\n' "$i" | bc)"
#done