intcmp(1): new tool; npc(1): new tool; scrut(1): new tool; str(1): new tool; strcmp(1): new tool; tests: added POSIX compatibility test and C compiler compatibility test; Makefile: converted to GNUmakefile; README: added README; docs: added docs

This commit is contained in:
2023-12-24 17:13:17 -07:00
parent b1f6caaf41
commit ef1416cd42
25 changed files with 997 additions and 487 deletions

19
tests/posix/test Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/sh
# Copyright (c) 2023 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.
set -e
i=1
while test -e "$i".test; do
printf '%s: %s: Running test...\n' "$0" "$i".test
./"$i".test >"$i".result
diff 1.expected 1.result
printf '%s: %s: Test passed.\n' "$0" "$i".test
i="$(printf '%s + %s\n' 1 "$i" | bc)"
done