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:
19
tests/posix/test
Executable file
19
tests/posix/test
Executable 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
|
||||
Reference in New Issue
Block a user