tests: bonsai/npc.sh: initial arg parsing tests

This commit is contained in:
dtb 2024-07-08 22:24:18 -06:00
parent 7939985c98
commit aa819cabc2
Signed by: trinity
GPG Key ID: 34C0543BBB6AF81B

34
tests/bonsai/npc.sh Executable file
View File

@ -0,0 +1,34 @@
#!/bin/sh
# 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.
. tests/bonsai/test_env
! npc -h
# arg parsing
npc -e </dev/null
npc -t </dev/null
npc -et </dev/null
! npc -et 5 </dev/null
#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