First, thank you for taking care and finding this issue.
When I recreated the book generation I also thought of this problem, but
was too lazy to actually tackle it.
There could be two solutions. I would prefer the second one.
(a) For each command, add a testcase into the src/input directory.
(b) the xtc like environments should also have yet another parameter,
\xtc{
TEXT
}{
COMMANDS
}{
TEST_CODE
}
then the testcase would be generated and automatically executed.
Both are a lot of work, but the only way to make sure that everything is
fine.
The book is anyway not yet perfect. There are still a number of places
where there are overly long formulas. I have no idea how to make them
"automatically" disappear. Formatting of formulas is a craft and hardly
automizable. Ideas welcome.
Ralf