New testing

This commit is contained in:
vxclutch
2026-05-11 13:22:36 -04:00
parent 8fb5146431
commit ac05b0fdfd
7 changed files with 80 additions and 64 deletions

View File

@@ -26,10 +26,23 @@ dist: clean
tar -czf $(DIST).tar.gz $(DIST)
rm -rf $(DIST)
test:
@./t/basic
check:
@failed=0; \
for f in ./t/*; do \
[ "$$f" = "./t/init.sh" ] && continue; \
[ -f "$$f" ] || continue; \
name=$$(basename "$$f"); \
sh "$$f"; rc=$$?; \
if [ $$rc -eq 0 ]; then \
printf '\e[0;32mPASS\e[0m: t/%s\n' "$$name"; \
else \
printf '\e[0;31mFAIL\e[0m: t/%s\n' "$$name"; \
failed=1; \
fi; \
done; \
if [ $$failed -ne 0 ]; then exit 1; fi
clean:
rm -f $(SRC_OBJ) $(LIB_OBJ) $(BIN) *.gz
.PHONY: dist clean all
.PHONY: dist clean all check