[Top][Contents] |
Other regression tests
[ << Top ] | [Top][Contents] | [ >> ] |
[ < Top ] | [ Up : Top ] | [ > ] |
Introduction
This document presents regression tests for LilyPond development that don’t have visually significant output; it mainly exists for completeness and to make the test documentation better available.
In the web version of this document, you can click on the figure for each example to see the corresponding input file.
[ << ] | [Top][Contents] | [ >> ] |
[ < ] | [ Up : Top ] | [ base-moment.ly > ] |
Regression test cases
[ << ] | [Top][Contents] | [ >> ] |
[ < ] | [ Up : ] | [ binary-search.ly > ] |
base-moment.ly
The deprecated context property baseMoment
accesses the
value of beatBase
.
![[image of music]](f2/lily-384f22c6.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < base-moment.ly ] | [ Up : ] | [ bookmark-encoding.ly > ] |
binary-search.ly
The binary-search
function works as documented.
![[image of music]](92/lily-41963da6.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < binary-search.ly ] | [ Up : ] | [ completion-unit-as-moment.ly > ] |
bookmark-encoding.ly
PDF bookmarks can contain UTF-8 characters. They are correctly rendered in PDF viewers.
Note: due to the way the regression test infrastructure currently works, any breakage in this test will not be noticed automatically.
![[image of music]](5c/lily-6d65423a.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < bookmark-encoding.ly ] | [ Up : ] | [ context-property-check.ly > ] |
completion-unit-as-moment.ly
The deprecated context property completionUnitAsMoment
accesses the value of completionUnit
.
![[image of music]](81/lily-6fd95249.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < completion-unit-as-moment.ly ] | [ Up : ] | [ display-lily-tests.ly > ] |
context-property-check.ly
This test covers \contextPropertyCheck
. It should run with
expected warnings. The visual output is not important.
![[image of music]](47/lily-47366a08.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < context-property-check.ly ] | [ Up : ] | [ embed-source-code-include-multiple-times.ly > ] |
display-lily-tests.ly
This is a test of the display-lily-music unit. Problems are reported on the stderr of this run.
![[image of music]](f6/lily-edb3eea9.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < display-lily-tests.ly ] | [ Up : ] | [ embed-source-code-order.ly > ] |
embed-source-code-include-multiple-times.ly
With the -dembed-source-code option, a file included multiple times is only embedded once.
Note: with the current regression testing infrastructure,
any breakage of this test will not be noticed in
make check
.
![[image of music]](3b/lily-766e4ebe.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < embed-source-code-include-multiple-times.ly ] | [ Up : ] | [ embed-source-code.ly > ] |
embed-source-code-order.ly
When using the -dembed-source-code option, embedded files are displayed in alphabetical order.
Note: with the current regression testing infrastructure,
any breakage of this test will not be noticed in
make check
.
![[image of music]](c0/lily-5b3d0c13.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < embed-source-code-order.ly ] | [ Up : ] | [ engraver-order.ly > ] |
embed-source-code.ly
-dembed-source-code
embeds source files
in PDFs, including include files, images and verbatim files.
Note: with the current regression testing infrastructure,
any breakage of this test will not be noticed in
make check
.
![[image of music]](34/lily-39b402ee.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < embed-source-code.ly ] | [ Up : ] | [ get-deprecated-property-special-warning.ly > ] |
engraver-order.ly
Engravers are run in the same order as they are specified (although it is generally preferred that the order does not matter).
This tests contains several scores, which output “Engraver 1 ran” and “Engraver 2 ran” in the log file. The order between these two lines in each score is what matters.
![[image of music]](c8/lily-f6351cd2.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < engraver-order.ly ] | [ Up : ] | [ grace-start-and-length.ly > ] |
get-deprecated-property-special-warning.ly
Getting a deprecated property may issue a special warning.
![[image of music]](b7/lily-3ef4eed5.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < get-deprecated-property-special-warning.ly ] | [ Up : ] | [ grid-interval-as-moment.ly > ] |
grace-start-and-length.ly
This tests the calculation of music start and length for various kinds of grace music. Problems are reported on stderr.
![[image of music]](d6/lily-2777d426.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < grace-start-and-length.ly ] | [ Up : ] | [ grob-array-list.ly > ] |
grid-interval-as-moment.ly
The deprecated context property gridIntervalAsMoment
accesses the value of gridInterval
.
![[image of music]](88/lily-dfed2a81.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < grid-interval-as-moment.ly ] | [ Up : ] | [ lilypond-version-outdated.ly > ] |
grob-array-list.ly
Conversions are possible between grob arrays and grob lists.
![[image of music]](53/lily-17995756.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < grob-array-list.ly ] | [ Up : ] | [ markup-to-string.ly > ] |
lilypond-version-outdated.ly
Test for versions considered outdated or not
(used when suggesting convert-ly
).
![[image of music]](1a/lily-40f1f47e.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < lilypond-version-outdated.ly ] | [ Up : ] | [ markup-with-relative-dir.ly > ] |
markup-to-string.ly
markup->string
takes a markup and tries
to convert it into an approximate string representation.
![[image of music]](12/lily-dcf23df7.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < markup-to-string.ly ] | [ Up : ] | [ measure-length-as-moment.ly > ] |
markup-with-relative-dir.ly
The function \withRelativeDir
helps
\markup
find input files relative to the input file, without
using lilypond
’s command line option -I.
To actually test this, lilypond
should be called from
another directory, for example
lilypond other/markup-with-relative-dir.ly
Note: with the current regression testing infrastructure it is not possible to check whether the command actually does its job.
![[image of music]](7d/lily-70b025fa.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < markup-with-relative-dir.ly ] | [ Up : ] | [ minimum-repeat-length-for-page-turn.ly > ] |
measure-length-as-moment.ly
The deprecated context property
measureLengthAsMoment
accesses the value of
measureLength
.
![[image of music]](c4/lily-4cd61d10.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < measure-length-as-moment.ly ] | [ Up : ] | [ number-to-duration.ly > ] |
minimum-repeat-length-for-page-turn.ly
The deprecated context property
minimumRepeatLengthForPageTurn
accesses the value of
pageTurnMinimumRepeatLength
.
![[image of music]](a7/lily-3f8e37c7.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < minimum-repeat-length-for-page-turn.ly ] | [ Up : ] | [ override-non-existent-property.ly > ] |
number-to-duration.ly
This tests the internal function ly:number->duration
.
Problems are reported on stderr.
![[image of music]](89/lily-c65bc02d.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < number-to-duration.ly ] | [ Up : ] | [ override-property-wrong-type.ly > ] |
override-non-existent-property.ly
\override
warns and rejects the assignment
if the property does not exist.
![[image of music]](2b/lily-a84a0742.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < override-non-existent-property.ly ] | [ Up : ] | [ page-turn-minimum-rest-length.ly > ] |
override-property-wrong-type.ly
\override
warns and rejects the assignment
if the value does not match the property’s type predicate.
![[image of music]](5c/lily-f0d9c724.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < override-property-wrong-type.ly ] | [ Up : ] | [ proportional-notation-duration-as-moment.ly > ] |
page-turn-minimum-rest-length.ly
The deprecated context property minimumPageTurnLength
accesses the value of pageTurnMinimumRestLength
.
![[image of music]](4c/lily-3844562f.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < page-turn-minimum-rest-length.ly ] | [ Up : ] | [ regex.ly > ] |
proportional-notation-duration-as-moment.ly
The deprecated context property
proportionalNotationDurationAsMoment
accesses the value of
proportionalNotationDuration
.
![[image of music]](56/lily-6d447042.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < proportional-notation-duration-as-moment.ly ] | [ Up : ] | [ repeat-start-and-length-no-alternatives.ly > ] |
regex.ly
Test the behavior of regular expression functions.
![[image of music]](d4/lily-9f151dcf.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < regex.ly ] | [ Up : ] | [ repeat-start-and-length-with-alternatives.ly > ] |
repeat-start-and-length-no-alternatives.ly
This tests the calculation of music start and length for various kinds of repeated music without alternatives. Problems are reported on stderr.
![[image of music]](89/lily-d14e8400.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < repeat-start-and-length-no-alternatives.ly ] | [ Up : ] | [ rhythmic-location-dead-grob.ly > ] |
repeat-start-and-length-with-alternatives.ly
This tests the calculation of music start and length for various kinds of repeated music with alternatives. Problems are reported on stderr.
![[image of music]](9a/lily-71080bfa.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < repeat-start-and-length-with-alternatives.ly ] | [ Up : ] | [ scheme-error-locations-include-files.ly > ] |
rhythmic-location-dead-grob.ly
grob::when
and grob::rhythmic-location
also work on
dead grobs.
![[image of music]](bd/lily-de5d4e8d.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < rhythmic-location-dead-grob.ly ] | [ Up : ] | [ scheme-error-locations-included-string.ly > ] |
scheme-error-locations-include-files.ly
In -dcompile-scheme-code
mode, source locations
are printed for Scheme errors, even if the faulty Scheme code
is in an include file.
![[image of music]](6a/lily-1f94fdb2.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < scheme-error-locations-include-files.ly ] | [ Up : ] | [ scheme-error-locations.ly > ] |
scheme-error-locations-included-string.ly
-dcompile-scheme-code
also works with
expressions included by ly:parser-include-string
and ly:parser-parse-string
. This test should print
two Scheme errors. (However, providing error messages that
point to the precise form that fails is not currently
implemented for included strings of code.)
![[image of music]](17/lily-f9460962.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < scheme-error-locations-included-string.ly ] | [ Up : ] | [ set-deprecated-property-special-warning.ly > ] |
scheme-error-locations.ly
When using the -dcompile-scheme-code
option,
Scheme errors point at the precise form where the error occurs
(this is limited by the precision of the information Guile provides).
![[image of music]](ce/lily-9b415503.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < scheme-error-locations.ly ] | [ Up : ] | [ set-deprecated-property-wrong-type.ly > ] |
set-deprecated-property-special-warning.ly
Setting a deprecated property may issue a special warning.
![[image of music]](78/lily-bbc7e52e.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < set-deprecated-property-special-warning.ly ] | [ Up : ] | [ set-non-existent-property-scheme.ly > ] |
set-deprecated-property-wrong-type.ly
\set
warns and refuses to assign a value that does not
match a deprecated property’s type predicate.
![[image of music]](df/lily-a578eb60.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < set-deprecated-property-wrong-type.ly ] | [ Up : ] | [ set-non-existent-property.ly > ] |
set-non-existent-property-scheme.ly
ly:context-set-property!
warns if the property does not
exist.
![[image of music]](0f/lily-eba5efd5.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < set-non-existent-property-scheme.ly ] | [ Up : ] | [ set-property-wrong-type.ly > ] |
set-non-existent-property.ly
\set
warns and rejects the assignment
if the property does not exist.
![[image of music]](24/lily-a07e343b.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < set-non-existent-property.ly ] | [ Up : ] | [ start-and-length.ly > ] |
set-property-wrong-type.ly
\set
warns and rejects the assignment
if the value does not match the property’s type predicate.
![[image of music]](9d/lily-98ef3d1e.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < set-property-wrong-type.ly ] | [ Up : ] | [ suggest-convert-ly.ly > ] |
start-and-length.ly
This tests the calculation of music start and length for various kinds of music. Problems are reported on stderr.
![[image of music]](fa/lily-b42f9da7.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < start-and-length.ly ] | [ Up : ] | [ syntax-function-curried.ly > ] |
suggest-convert-ly.ly
When the file’s version statement is outdated
and compilation fails, a message is printed to encourage use
of convert-ly
.
![[image of music]](53/lily-f2c051f6.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < suggest-convert-ly.ly ] | [ Up : ] | [ syntax-function-docstring.ly > ] |
syntax-function-curried.ly
Syntax functions can use curried definitions.
![[image of music]](6a/lily-77278528.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < syntax-function-curried.ly ] | [ Up : ] | [ syntax-function-rest.ly > ] |
syntax-function-docstring.ly
Syntax functions’ docstrings are preserved (mainly for the sake of doc autogeneration).
![[image of music]](ed/lily-ab85a3ba.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < syntax-function-docstring.ly ] | [ Up : ] | [ tempo-wholes-per-minute-as-moment.ly > ] |
syntax-function-rest.ly
Syntax functions can use rest arguments.
![[image of music]](28/lily-3a0825df.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < syntax-function-rest.ly ] | [ Up : ] | [ translator-duplicate.ly > ] |
tempo-wholes-per-minute-as-moment.ly
The deprecated context property tempoWholesPerMinuteAsMoment
accesses the value of tempoWholesPerMinute
.
![[image of music]](8a/lily-c1739c2e.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < tempo-wholes-per-minute-as-moment.ly ] | [ Up : ] | [ tuplet-spanner-duration-as-moment.ly > ] |
translator-duplicate.ly
Only one instance of a translator can exist in a context. Duplicates are eliminated.
![[image of music]](4c/lily-3143e96b.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < translator-duplicate.ly ] | [ Up : ] | [ unset-non-existent-property-scheme.ly > ] |
tuplet-spanner-duration-as-moment.ly
The deprecated context property
tupletSpannerDurationAsMoment
accesses the value of
tupletSpannerDuration
.
![[image of music]](d7/lily-caf869aa.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < tuplet-spanner-duration-as-moment.ly ] | [ Up : ] | [ unset-non-existent-property.ly > ] |
unset-non-existent-property-scheme.ly
ly:context-unset-property
warns if the property does not
exist.
![[image of music]](19/lily-f6efa66c.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < unset-non-existent-property-scheme.ly ] | [ Up : ] | [ unspecified-from-callback.ly > ] |
unset-non-existent-property.ly
\unset
warns if the property does not exist.
![[image of music]](0c/lily-9983d5c5.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < unset-non-existent-property.ly ] | [ Up : ] | [ version-incomplete-bad.ly > ] |
unspecified-from-callback.ly
Callbacks returning *unspecified*
are only
run once, as all callbacks.
![[image of music]](c1/lily-a0d02084.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < unspecified-from-callback.ly ] | [ Up : ] | [ version-incomplete-good.ly > ] |
version-incomplete-bad.ly
An incomplete version statement, with the third number omitted, is rejected if the second number is odd.
![[image of music]](a3/lily-71ed621f.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < version-incomplete-bad.ly ] | [ Up : ] | [ version-invalid.ly > ] |
version-incomplete-good.ly
An incomplete version statement, with the third number omitted,
is accepted if the second number is even. This also tests the message
suggesting convert-ly
in such cases.
![[image of music]](97/lily-1a0c82aa.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < version-incomplete-good.ly ] | [ Up : ] | [ version-outdated-error.ly > ] |
version-invalid.ly
An invalid \version
statement should result in an error
and a nonzero return code.
![[image of music]](c1/lily-bcf1c10c.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < version-invalid.ly ] | [ Up : ] | [ void-function-empty.ly > ] |
version-outdated-error.ly
A \version
statement newer than the running
version of LilyPond should result in an error and a nonzero return
code.
![[image of music]](ea/lily-faf4d443.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < version-outdated-error.ly ] | [ Up : ] | [ volta-spanner-duration-as-moment.ly > ] |
void-function-empty.ly
A void function’s body can be empty.
![[image of music]](ab/lily-9a2a8549.png)
[ << ] | [Top][Contents] | [ >> ] |
[ < void-function-empty.ly ] | [ Up : ] | [ > ] |
volta-spanner-duration-as-moment.ly
The deprecated context property voltaSpannerDurationAsMoment
accesses the value of internal property voltaBracketMusicalLength
.
![[image of music]](ac/lily-2e36126c.png)