Other regression tests


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.


Regression test cases


base-moment.ly

The deprecated context property baseMoment accesses the value of beatBase.

[image of music]

binary-search.ly

The binary-search function works as documented.

[image of music]

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]

completion-unit-as-moment.ly

The deprecated context property completionUnitAsMoment accesses the value of completionUnit.

[image of music]

context-property-check.ly

This test covers \contextPropertyCheck. It should run with expected warnings. The visual output is not important.

[image of music]

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]

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]

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]

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]

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]

get-deprecated-property-special-warning.ly

Getting a deprecated property may issue a special warning.

[image of music]

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]

grid-interval-as-moment.ly

The deprecated context property gridIntervalAsMoment accesses the value of gridInterval.

[image of music]

grob-array-list.ly

Conversions are possible between grob arrays and grob lists.

[image of music]

lilypond-version-outdated.ly

Test for versions considered outdated or not (used when suggesting convert-ly).

[image of music]

markup-to-string.ly

markup->string takes a markup and tries to convert it into an approximate string representation.

[image of music]

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]

measure-length-as-moment.ly

The deprecated context property measureLengthAsMoment accesses the value of measureLength.

[image of music]

minimum-repeat-length-for-page-turn.ly

The deprecated context property minimumRepeatLengthForPageTurn accesses the value of pageTurnMinimumRepeatLength.

[image of music]

number-to-duration.ly

This tests the internal function ly:number->duration. Problems are reported on stderr.

[image of music]

override-non-existent-property.ly

\override warns and rejects the assignment if the property does not exist.

[image of music]

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]

page-turn-minimum-rest-length.ly

The deprecated context property minimumPageTurnLength accesses the value of pageTurnMinimumRestLength.

[image of music]

proportional-notation-duration-as-moment.ly

The deprecated context property proportionalNotationDurationAsMoment accesses the value of proportionalNotationDuration.

[image of music]

regex.ly

Test the behavior of regular expression functions.

[image of music]

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]

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]

rhythmic-location-dead-grob.ly

grob::when and grob::rhythmic-location also work on dead grobs.

[image of music]

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]

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]

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]

set-deprecated-property-special-warning.ly

Setting a deprecated property may issue a special warning.

[image of music]

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]

set-non-existent-property-scheme.ly

ly:context-set-property! warns if the property does not exist.

[image of music]

set-non-existent-property.ly

\set warns and rejects the assignment if the property does not exist.

[image of music]

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]

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]

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]

syntax-function-curried.ly

Syntax functions can use curried definitions.

[image of music]

syntax-function-docstring.ly

Syntax functions’ docstrings are preserved (mainly for the sake of doc autogeneration).

[image of music]

syntax-function-rest.ly

Syntax functions can use rest arguments.

[image of music]

tempo-wholes-per-minute-as-moment.ly

The deprecated context property tempoWholesPerMinuteAsMoment accesses the value of tempoWholesPerMinute.

[image of music]

translator-duplicate.ly

Only one instance of a translator can exist in a context. Duplicates are eliminated.

[image of music]

tuplet-spanner-duration-as-moment.ly

The deprecated context property tupletSpannerDurationAsMoment accesses the value of tupletSpannerDuration.

[image of music]

unset-non-existent-property-scheme.ly

ly:context-unset-property warns if the property does not exist.

[image of music]

unset-non-existent-property.ly

\unset warns if the property does not exist.

[image of music]

unspecified-from-callback.ly

Callbacks returning *unspecified* are only run once, as all callbacks.

[image of music]

version-incomplete-bad.ly

An incomplete version statement, with the third number omitted, is rejected if the second number is odd.

[image of music]

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]

version-invalid.ly

An invalid \version statement should result in an error and a nonzero return code.

[image of music]

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]

void-function-empty.ly

A void function’s body can be empty.

[image of music]

volta-spanner-duration-as-moment.ly

The deprecated context property voltaSpannerDurationAsMoment accesses the value of internal property voltaBracketMusicalLength.

[image of music]

Other regression tests v2.25.25 (development-branch).