ConTeXt and Lua programming/ConTeXt Development/Test suite

From Wiki
< ConTeXt and Lua programming‎ | ConTeXt Development
Revision as of 22:02, 28 January 2025 by Garulfoo (talk | contribs) (→‎Where is it?)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

What is it?

The test suite is a set of files that exercise many ConTeXt features and are used by Hans for testing releases.

Where is it?

They are on the PRAGMA site as a tar.xz archive or zip archive.

How can they be useful?

On the mailing list, Hans sometimes points one to minimal examples of a feature being asked about. You can recursively grep through the (uncompressed) archive to find the example. For example, I had asked about coupled problems and solutions, for which the relevant mechanism is blocks. To quote Hans: "(there are some examples in the test suite under blocks)." After I unpacked the archive (into /tmp/doc/), the following command located the examples:

$ grep -r -n  --include='*.tex' '\<block\>' /tmp/doc/
/tmp/doc/context/tests/mkiv/blocks/blocks-001.tex:89:\chapter{Normal block use}
/tmp/doc/context/tests/mkiv/blocks/blocks-001.tex:91:    % test normal block use
/tmp/doc/context/tests/mkiv/blocks/blocks-001.tex:164:    % test nested block
/tmp/doc/context/tests/mkiv/blocks/blocks-001.tex:171:\startquestion Is this a question in a nested block? \stopquestion
/tmp/doc/context/tests/mkiv/blocks/blocks-001.tex:178:Here we call for the nested block: