BASIC Test Suite

April 8, 2026 ยท View on GitHub

This is a collection of BASIC programs that will exercise various features of the language.

TrekBasic Family

TrekBasic is part of the TrekBasic family of BASIC programming tools.

LOGOProjectDescriptionLanguageInterpreterCompiler
LogoTrekBasicBasic compiler and interpreterPythonYesYes
LogoTrekBasicJBasic compiler and interpreterJavaYesYes
LogoBasicRSBasic compiler and interpreterRustYesYes
LogoBasicTestSuiteA test suite for BasicBASIC--
LogoTrekBotA tool to exercise the superstartrek programRust--

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

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.

Conventions

The test programs are supposed to run and return a 0 (success) status code.

Directives

EXPECT_EXIT_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.