tests: bonsai/npc.sh: initial arg parsing tests
This commit is contained in:
parent
7939985c98
commit
aa819cabc2
34
tests/bonsai/npc.sh
Executable file
34
tests/bonsai/npc.sh
Executable 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
|
Loading…
Reference in New Issue
Block a user