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>
Co-Authored-By: Andrew Kesterson <andrew@aklabs.net>
This commit is contained in:
2026-07-31 12:35:40 -04:00
parent 0cf88bbbe2
commit 06dc086ecd
92 changed files with 503 additions and 50 deletions

View File

@@ -0,0 +1 @@
10 PRINT ATN(3)

View File

@@ -0,0 +1 @@
1.249046

View File

@@ -0,0 +1,3 @@
10 PRINT "97 : " + CHR(97)
20 PRINT "65 : " + CHR(65)
30 PRINT "64 : " + CHR(64)

View File

@@ -0,0 +1,3 @@
97 : a
65 : A
64 : @

View File

@@ -0,0 +1 @@
10 PRINT COS(90)

View File

@@ -0,0 +1 @@
-0.448074

View File

@@ -0,0 +1 @@
10 PRINT HEX(255)

View File

@@ -0,0 +1 @@
ff

View File

@@ -0,0 +1,3 @@
10 X$ = "HELLO"
20 Y$ = "LLO"
30 PRINT INSTR(X$, Y$)

View File

@@ -0,0 +1 @@
2

View File

@@ -0,0 +1 @@
10 PRINT LEFT("HELLO", 2)

View File

@@ -0,0 +1 @@
HE

View File

@@ -0,0 +1,5 @@
10 A$ = "HELLO"
20 STRLEN# = LEN(A$)
30 IF STRLEN# == 5 THEN GOTO 50
40 PRINT "FAILURE"
50 PRINT "SUCCESS"

View File

@@ -0,0 +1 @@
SUCCESS

View File

@@ -0,0 +1 @@
10 PRINT LOG(3.14)

View File

@@ -0,0 +1 @@
1.144223

View File

@@ -0,0 +1,3 @@
10 A$ = "HELLO"
20 B$ = MID(A$, 2, 3)
30 PRINT B$

View File

@@ -0,0 +1 @@
LLO

View File

@@ -0,0 +1,6 @@
10 PRINT MOD(10, 3)
20 PRINT MOD(12, 5)
30 PRINT MOD(4, 2)
40 REM MOD() ONLY WORKS WITH INTEGERS - RESULTS WITH FLOATING POINT ARE UNRELIABLE
50 REM PRINT MOD(1.2, 0.4)
60 REM THERE IS NO ERROR THROWN HERE. JUST DONT DO IT.

View File

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

View File

@@ -0,0 +1,8 @@
10 A# = 255
20 B# = POINTER(A#)
30 IF PEEK(B#) == 255 THEN GOTO 50
40 PRINT "FAILURE: PEEK != 255"
50 POKE B#, 127
60 IF PEEK(B#) == 127 THEN GOTO 80
70 PRINT "FAILURE : POKE DID NOT SET 127"
80 PRINT "SUCCESS"

View File

@@ -0,0 +1 @@
SUCCESS

View File

@@ -0,0 +1 @@
10 PRINT RAD(90)

View File

@@ -0,0 +1 @@
1.570796

View File

@@ -0,0 +1,2 @@
10 PRINT RIGHT("HELLO", 3)
20 PRINT RIGHT("HELLO", 7)

View File

@@ -0,0 +1,2 @@
LLO
HELLO

View File

@@ -0,0 +1,4 @@
10 X# = -1
20 PRINT SGN(X#)
30 PRINT SGN(0)
40 PRINT SGN(1)

View File

@@ -0,0 +1,3 @@
-1
0
1

View File

@@ -0,0 +1,4 @@
10 A# = 8
20 B# = SHL(A#, 2)
30 PRINT B#
40 PRINT SHL(8, 2)

View File

@@ -0,0 +1,2 @@
32
32

View File

@@ -0,0 +1,4 @@
10 A# = 32
20 B# = SHR(A#, 2)
30 PRINT B#
40 PRINT SHR(32, 2)

View File

@@ -0,0 +1,2 @@
8
8

View File

@@ -0,0 +1 @@
10 PRINT SIN(90)

View File

@@ -0,0 +1 @@
0.893997

View File

@@ -0,0 +1 @@
10 PRINT "BASIC IS" + SPC(16) + "FUN"

View File

@@ -0,0 +1 @@
BASIC IS FUN

View File

@@ -0,0 +1,2 @@
10 X% = -123.456
20 PRINT STR(X%)

View File

@@ -0,0 +1 @@
-123.456000

View File

@@ -0,0 +1 @@
10 PRINT TAN(90)

View File

@@ -0,0 +1 @@
-1.995200

View File

@@ -0,0 +1,3 @@
10 PRINT VAL("32")
20 PRINT VAL("123.456")
30 PRINT VAL("-256")

View File

@@ -0,0 +1,3 @@
32.000000
123.456000
-256.000000

View File

@@ -0,0 +1,2 @@
10 PRINT XOR(50, 10)
20 PRINT XOR(25, 5)

View File

@@ -0,0 +1,2 @@
56
28