The test suite uses ooRexxUnit
with ooTest extensions. All tests are
in .testGroup files under suites/.
From the tests/ directory:
rexx RunTests.rex
This performs two sanity checks before running any suite:
CheckMessages.rex
verifies that the error messages in the parser source code are
consistent with rexxmsg.xml.CheckErrorText.rex
verifies that bin/ANSI.ErrorText.cls is up to date with
rexxmsg.xml.If either check fails, the run aborts. GenErrorText.rex is the
generator that produces ANSI.ErrorText.cls from
rexxmsg.xml; it is called automatically by
CheckErrorText.rex --fix. To auto-regenerate
ANSI.ErrorText.cls when it is out of date:
rexx RunTests.rex --fix
Then it discovers all .testGroup files in
suites/ and runs them.
Individual suites can also be run standalone:
cd tests
PATH="framework:suites:../bin:$PATH" rexx suites/BIFs.testGroup
| Suite | Tests | Assertions | What it covers |
|---|---|---|---|
| BIFs | 70 | 549 | BIF argument validation (parametric) |
| FencedCode | 26 | 26 | Fenced code block processing |
| Highlighter | 108 | 108 | Highlighter engine, ANSI driver, StylePatch |
| KeywordInstructions | 3 | 12 | LEAVE, ITERATE, GUARD, SIGNAL |
| Regressions | 8 | 10 | Reported regressions (JLF, 20250419) |
| RexxPubOptions | 62 | 62 | YAML option parsing, CSS overrides |
| SyntaxErrors | 31 | 297 | Syntax errors 6–47, 89, 98, 99 |
| YAMLFrontMatter | 43 | 43 | YAML front matter parsing |
| Total | 351 | 1107 |
ParserTestCase.cls
extends ooTestCase with three helpers:
parserError(code, source) — asserts
that the parser raises the expected syntax error for the given
source.parserOK(source) — asserts that the
parser accepts the source without errors.parserOnly(source) — like
parserOK, but only runs the parser (no interpreter). Needed
for code with uninitialized variables, infinite loops, or interactive
trace.TempTestCase.cls
extends ooTestCase for tests that need temporary files or folders. They
are created with the framework's .TemporaryTestFile and
.TemporaryTestDirectory classes in the platform's temporary
directory (.File~temporaryPath: TMPDIR or
/tmp on Unix-like systems, %TEMP% on Windows),
as the ooRexx test suite does, and are deleted afterwards:
tempFile(name [, contents]) — a file,
written; returns its full path. Every name gets a suffix of its own,
before its extension.tempDir(name) — a folder, made;
returns its full path.tearDown — deletes everything the test
asked for, whether it passed or not; a folder goes with all that is in
it. A subclass with a tearDown of its own calls
self~tearDown:super.rmTree(path) — deletes a file, or a
folder and all that is in it; it refuses any path outside the temporary
directory.Documented as comments in SyntaxErrors.testGroup:
test.rex, test.md — minimal examples referenced in
documentation.experimental/ —
experimental feature examples (class extensions, WIP Lua-like tables).
See doc/experimental/
for documentation.cgi/ contains integration tests for
CGI.markdown.rex. These are not run by
RunTests.rex — they require a running Apache instance. See
cgi/readme.md for setup
instructions and test details (39 tests covering response structure,
YAML options, docclass handling, fenced code, URL parameters, print=pdf,
and view=highlight).
pdf/ contains integration tests for
md2pdf.rex. These are not run by
RunTests.rex — they require Pandoc, pagedjs-cli, and
poppler-utils. See pdf/readme.md for setup
instructions and test details (18 tests covering PDF generation,
validation, content extraction, docclass handling, fenced code, section
numbers, error handling, and page size).