openlilylib / oll-core

Library Infrastructure for LilyPond add-ons
17 stars 13 forks source link

Create a "test" module to perform package tests #32

Open uliska opened 7 years ago

uliska commented 7 years ago

I think it would be good to create a testing framework not in Python but directly in LilyPond/Scheme.

This would be a module oll-core.test with a function \testPackages <package-list>

\include "oll-core/package.ily"
\loadModule oll-core.test
\testPackages scholarly.analysis,edition-engraver
% or
\testPackage all

If given a symbol-list all packages are tested (in that order), the special symbol 'all will look for all installed packages.

The command will browse a package for test cases (it has to be defined how these are specified. The previous testing infrastructure would load all .ly files in usage-example directories. See also #23 and #24 ) and invoke LilyPond to compile them. (Question: Should this use Scheme commands to compile or invoke LilyPond through the shell?)