This is a collection of BASIC programs that will exercise various features of the language.
TrekBasic is part of the TrekBasic family of BASIC programming tools.
| LOGO | Project | Description | Language | Interpreter | Compiler |
|---|---|---|---|---|---|
| TrekBasic | Basic compiler and interpreter | Python | Yes | Yes | |
| TrekBasicJ | Basic compiler and interpreter | Java | Yes | Yes | |
| BasicRS | Basic compiler and interpreter | Rust | Yes | Yes | |
| BasicTestSuite | A test suite for Basic | BASIC | - | - | |
| TrekBot | A tool to exercise the superstartrek program | Rust | - | - |
All versions, interpreted and compiled, are intended to by byte-by-byte compatible, but are not there yet - but they are close. TrekBot and BasicTestSuite are part of the plan to ensure full compatibility.
Test runners (in Python, Java and Rust) simply iterate over all *.bas files found in the directory. Those test runners are found in their respective projects, above.
The test programs are supposed to run and return a 0 (success) status code.
The test runners chack the first line for a rem statement with directives. A STOP would normally indicate an error, but with EXPECT_EXIT_CODE=1, exiting with 1 (STOP) is considered success.
100 REM @EXPECT_EXIT_CODE=1
This indicates that a program should finish with a STOP command, which would normally be an error.