feat(v4.0.0): the POST runner -- the kernel feeds a case and judges it from outside

v4/system/post.c: for each case it empties the node's data stack, sends
DECIMAL FORTH DEFINITIONS, sends the case's lines keeping what the node
prints, reads the stack, and judges: an error exactly if one is expected,
and otherwise the stack and every character printed.  A failing case is
named with what it printed and left.  Nothing of it is on the node.

Its tests are in test_host_quit.c, on that test's node: 29 checks of cases
that must pass and cases that must fail -- a wrong value, depth, order or
output, an error wanted or unwanted, a case of two lines, depth-only
cases, the starting state, more printing than is kept, and a line that
never comes back.  Both widths and the sanitizers.

The boot still runs the capsule; that is the next commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rajames
2026-10-07 10:36:36 -04:00
co-authored by Claude Opus 5.5
parent c2f4b9808a
commit 2bf958ce3a
4 changed files with 241 additions and 1 deletions
+3 -1
View File
@@ -72,7 +72,9 @@ $(BINDIR)/san-v3blocks.o: $(V3_BLOCK_SRCS) $(wildcard $(ROOT_DIR)/v3/include/*.h
$(LD) -r $(BINDIR)/san-v3o/*.o -o $@
# blocks.c is compiled with each test that uses it, under that test's own
# flags: its warnings, its sanitizers, its cell width and node size.
blocks_src = $(if $(call uses_blocks,$(1)),$(BLOCKS_SRC))
# So are POST's runner and its cases (system/post.c, system/post_cases.c;
# docs/v4.0.0/NUCLEUS.md 6.3), which are the kernel's too.
blocks_src = $(if $(call uses_blocks,$(1)),$(BLOCKS_SRC) $(HERE)/system/post.c $(HERE)/system/post_cases.c)
blocks_objs = $(if $(call uses_blocks,$(1)),$(BINDIR)/v3blocks.o)
san_blocks_objs = $(if $(call uses_blocks,$(1)),$(BINDIR)/san-v3blocks.o)