Check the reference corpus in, so the build stops needing the Go submodule

All 41 .bas/.txt pairs copied byte for byte from basicinterpreter@d76162c into
tests/reference/, plus the Commodore font into assets/fonts/ -- the two things
that tied the build to deps/basicinterpret. Both were verified cmp-identical
to the submodule copies.

This reverses a decision that was deliberate and correct at the time: the
corpus was driven in place because copying a submodule's corpus guarantees
drift. Overruled on purpose -- the Go dependency is being deprecated, and a
build that cannot run its acceptance suite without cloning the implementation
it replaced is not finished. tests/reference/README.md records what the drift
now costs and that those expectations are never edited.

Checked rather than assumed: both configurations configure, build and pass
from scratch with deps/basicinterpret moved out of the tree entirely.

The submodule is kept as the behavioural spec, which is a real use. The font
came with an open licence question; assets/fonts/PROVENANCE.md states it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-31 12:35:40 -04:00
parent bf9cf85130
commit eb5374d212
92 changed files with 503 additions and 50 deletions

View File

@@ -0,0 +1,4 @@
10 FOR I# = 1 TO 4
20 PRINT I#
30 NEXT I#
40 QUIT

View File

@@ -0,0 +1,4 @@
1
2
3
4

View File

@@ -0,0 +1,13 @@
10 REM This shows the waitingForCommand utility in the BasicEnvironment
11 REM We have a FOR loop here with a condition where the loop should
12 REM not execute at all. But because the checking of the conditional is
13 REM delayed until the bottom of the loop, we run the risk of the
14 REM runtime executing every line between FOR ... NEXT even though it
15 REM shouldn't. waitingForCommand prevents this from occurring
20 FOR I# = 1 TO 1
30 PRINT "waitingForCommand FAILS if this is seen"
40 NEXT I#
50 FOR I# = 1 TO 2
60 PRINT "waitingForCommand PASS if this is seen"
70 NEXT I#
80 QUIT

View File

@@ -0,0 +1,2 @@
waitingForCommand PASS if this is seen
waitingForCommand PASS if this is seen

View File

@@ -0,0 +1,3 @@
10 GOTO 30
20 PRINT "FAILURE"
30 PRINT "SUCCESS"

View File

@@ -0,0 +1 @@
SUCCESS

View File

@@ -0,0 +1,11 @@
10 A# = 1
20 IF A# == 1 THEN GOTO 30 ELSE GOTO 40
30 PRINT "A# IS 1"
35 GOTO 50
45 PRINT "A# IS NOT 1"
50 IF A# == 2 THEN GOTO 60 ELSE GOTO 80
60 PRINT "A# IS 2"
65 PRINT A#
70 GOTO 90
80 PRINT "A# IS NOT 2"
90 PRINT "DONE"

View File

@@ -0,0 +1,3 @@
A# IS 1
A# IS NOT 2
DONE

View File

@@ -0,0 +1,10 @@
10 FOR I# = 1 TO 4
15 PRINT "OUTER : I# IS " + I#
20 FOR J# = 2 TO 3
23 PRINT "INNER : I# IS " + I#
25 PRINT "INNER : J# IS " + J#
30 PRINT "INNER : I# * J# IS " + (I# * J#)
40 NEXT J#
50 NEXT I#
60 PRINT "DONE"
70 QUIT

View File

@@ -0,0 +1,29 @@
OUTER : I# IS 1
INNER : I# IS 1
INNER : J# IS 2
INNER : I# * J# IS 2
INNER : I# IS 1
INNER : J# IS 3
INNER : I# * J# IS 3
OUTER : I# IS 2
INNER : I# IS 2
INNER : J# IS 2
INNER : I# * J# IS 4
INNER : I# IS 2
INNER : J# IS 3
INNER : I# * J# IS 6
OUTER : I# IS 3
INNER : I# IS 3
INNER : J# IS 2
INNER : I# * J# IS 6
INNER : I# IS 3
INNER : J# IS 3
INNER : I# * J# IS 9
OUTER : I# IS 4
INNER : I# IS 4
INNER : J# IS 2
INNER : I# * J# IS 8
INNER : I# IS 4
INNER : J# IS 3
INNER : I# * J# IS 12
DONE

View File

@@ -0,0 +1,11 @@
10 REM This shows the waitingForCommand utility in the BasicEnvironment
11 REM when we have a nested for loop. The inner loop SHOULD execute, but
12 REM the outer loop should NOT execute. Therefore, neither loop should execute.
20 FOR I# = 1 TO 0
25 FOR J# = 2 TO 4
30 PRINT "waitingForCommand FAILS if this is seen"
32 QUIT
35 NEXT J#
40 NEXT I#
50 PRINT "SUCCESS"
80 QUIT

View File

@@ -0,0 +1 @@
SUCCESS