From 6a1f558672bd534fdadc7ae559c8711c0ccb21ea Mon Sep 17 00:00:00 2001 From: Julien Rioux Date: Sat, 21 Jan 2012 19:56:25 -0500 Subject: [PATCH] Build: Run regression tests for lilypond-book (issue 2223). Re-enable running the regtests in input/regression/lilypond-book. Fix various typos, clarify what each input file tests for and how the output should look, and fix the following problems in input files in input/regression/lilypond-book: collated-files.tely: Was linking to the input files rather than the output files generated by lilypond-book. The input files were thus not tested individually as it should but as included files. Fixed in the local GNUmakefile by an explicit rule for collated-files.list which tracks the output files. suffix-texi: Failed, was not being preprocessed by lilypond-book but simply copied to the output folder. Fixed in the local GNUmakefile by adding a specific make rule for it. tex-twocolumn: Failed, image had full-page width. Fixed in the input file by moving \twocolumn to the preamble. Column width detection in the body of the tex document is not yet implemented. texinfo-language-detection: Suspicious, had a weird @lydoctitle popping up. Fixed in the input file by defining the @lydoctitle macro. --- input/regression/lilypond-book/GNUmakefile | 16 ++++++++-- .../lilypond-book/html-newline-after-tag.html | 2 +- .../lilypond-book/html-space-after-tag.html | 2 +- .../lilypond-book/html-version-newline.html | 2 +- .../lilypond-book/html-version.html | 2 +- input/regression/lilypond-book/include3.ily | 4 +-- .../lilypond-book/tex-comment-firstline.lytex | 3 +- .../tex-graphics-package-added.lytex | 2 +- .../lilypond-book/tex-include-file.lytex | 2 +- .../lilypond-book/tex-include-options.lytex | 2 +- .../lilypond-book/tex-inline-lilypond.lytex | 2 +- .../tex-lilypond-inside-itemize.lytex | 2 +- .../tex-lilypond-inside-table.lytex | 2 +- .../tex-musicxml-file-options.lytex | 2 +- .../lilypond-book/tex-musicxml-file.lytex | 2 +- .../lilypond-book/tex-paragraphs.lytex | 2 +- .../lilypond-book/tex-snippet-options.lytex | 27 ++++++++++------ .../lilypond-book/tex-twocolumn.lytex | 31 ++++++++++++++++--- .../lilypond-book/tex-verbatim.lytex | 7 +++-- .../lilypond-book/tex-version.lytex | 2 +- .../texinfo-include-language-detection.tely | 5 +++ .../texinfo-language-detection.tely | 5 +++ .../texinfo-musicxml-file-options.tely | 4 +-- .../lilypond-book/texinfo-musicxml-file.tely | 4 +-- ...-docs.tely => texinfo-papersize-docs.tely} | 2 +- 25 files changed, 96 insertions(+), 40 deletions(-) rename input/regression/lilypond-book/{papersize-docs.tely => texinfo-papersize-docs.tely} (98%) diff --git a/input/regression/lilypond-book/GNUmakefile b/input/regression/lilypond-book/GNUmakefile index 6081f7fe36..a1b4dd6b62 100644 --- a/input/regression/lilypond-book/GNUmakefile +++ b/input/regression/lilypond-book/GNUmakefile @@ -3,16 +3,28 @@ depth = ../../.. STEPMAKE_TEMPLATES=documentation texinfo LOCALSTEPMAKE_TEMPLATES=lilypond ly lysdoc lilypond-book -COLLATED_FILES = $(OUT_FILES) - include $(depth)/make/stepmake.make TITLE=lilypond-book Test Suite +COLLATED_FILES = $(OUT_FILES) + EXTRA_DIST_FILES = include.mxl +EXTRA_DIST_FILES += include.xml EXTRA_DIST_FILES += $(call src-wildcard,*.ly) EXTRA_DIST_FILES += $(call src-wildcard,*.ily) EXTRA_DIST_FILES += $(call src-wildcard,*.tely) EXTRA_DIST_FILES += $(call src-wildcard,*.itely) +XML_FILES = $(filter-out include%,$(call src-wildcard,*.xml)) + +local-test: $(OUT_FILES) + +$(outdir)/collated-files.list: $(OUT_FILES) + echo $(sort $(OUT_FILES)) > $@ + +$(outdir)/suffix-texi.texi: suffix-texi.texi $(outdir)/version.itexi $(DOCUMENTATION_LOCALE_TARGET) $(INIT_LY_SOURCES) $(SCHEME_SOURCES) + LILYPOND_VERSION=$(TOPLEVEL_VERSION) $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BOOK_PROCESS) $(LILYPOND_BOOK_LILYPOND_FLAGS)' --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) $(LILYPOND_BOOK_FLAGS) --redirect-lilypond-output $< +# Prevent parallel lilypond-book instances for this subdir +.NOTPARALLEL: diff --git a/input/regression/lilypond-book/html-newline-after-tag.html b/input/regression/lilypond-book/html-newline-after-tag.html index 2ad549cab8..1f5b82662e 100644 --- a/input/regression/lilypond-book/html-newline-after-tag.html +++ b/input/regression/lilypond-book/html-newline-after-tag.html @@ -1,6 +1,6 @@ -Lilypond fragment with newlines before the end tags. +A LilyPond fragment with newlines before the end tags. \key c \minor c4 es g2 diff --git a/input/regression/lilypond-book/html-space-after-tag.html b/input/regression/lilypond-book/html-space-after-tag.html index a0be117f61..50edb7da3f 100644 --- a/input/regression/lilypond-book/html-space-after-tag.html +++ b/input/regression/lilypond-book/html-space-after-tag.html @@ -1,6 +1,6 @@ -Lilypond fragment with spaces and tabs before the end tags. +A LilyPond fragment with spaces and tabs before the end tags. \key c \minor c4 es g2 diff --git a/input/regression/lilypond-book/html-version-newline.html b/input/regression/lilypond-book/html-version-newline.html index 8519705199..58bb007fe0 100644 --- a/input/regression/lilypond-book/html-version-newline.html +++ b/input/regression/lilypond-book/html-version-newline.html @@ -1,6 +1,6 @@ -Lilypond version: diff --git a/input/regression/lilypond-book/html-version.html b/input/regression/lilypond-book/html-version.html index 3fdc33272d..c4a58be45e 100644 --- a/input/regression/lilypond-book/html-version.html +++ b/input/regression/lilypond-book/html-version.html @@ -1,5 +1,5 @@ -Lilypond version: +LilyPond version: diff --git a/input/regression/lilypond-book/include3.ily b/input/regression/lilypond-book/include3.ily index 0b877e3251..5cb7ef2353 100644 --- a/input/regression/lilypond-book/include3.ily +++ b/input/regression/lilypond-book/include3.ily @@ -1,9 +1,9 @@ \version "2.14.0" \header { -doctitlees = "If you see this 'translated' doctitle, language detection work" +doctitlees = "If you see this 'translated' doctitle, language detection works!" -texidoces = "If you see this 'translated' texidoc, language detection work" +texidoces = "If you see this 'translated' texidoc, language detection works!" texidoc = "Original texidoc (you should not see this!)" doctitle = "Original doctitle (you should not see this!)" diff --git a/input/regression/lilypond-book/tex-comment-firstline.lytex b/input/regression/lilypond-book/tex-comment-firstline.lytex index 5d0ae0c0a3..f14873fff0 100644 --- a/input/regression/lilypond-book/tex-comment-firstline.lytex +++ b/input/regression/lilypond-book/tex-comment-firstline.lytex @@ -4,8 +4,9 @@ \begin{document} -\section{A coment on the first line of the file} +\section{A comment on the first line of the file} +The source file for this document contains a comment on the first line. This should not confuse the auto-detection of lilypond-book... \begin{lilypond} diff --git a/input/regression/lilypond-book/tex-graphics-package-added.lytex b/input/regression/lilypond-book/tex-graphics-package-added.lytex index d94360ab54..b4b51b31cb 100644 --- a/input/regression/lilypond-book/tex-graphics-package-added.lytex +++ b/input/regression/lilypond-book/tex-graphics-package-added.lytex @@ -2,7 +2,7 @@ \begin{document} -\section{Lilypond-book should add the graphicx package} +\section{LilyPond-book should add the graphicx package} If a latex file does not yet include the graphicx package, it is added by lilypond-book. diff --git a/input/regression/lilypond-book/tex-include-file.lytex b/input/regression/lilypond-book/tex-include-file.lytex index 6705a7ff14..1045df4729 100644 --- a/input/regression/lilypond-book/tex-include-file.lytex +++ b/input/regression/lilypond-book/tex-include-file.lytex @@ -1,5 +1,5 @@ \documentclass{article} \begin{document} -Including Lilypond file: +Including a LilyPond file without any options: \lilypondfile{include2.ly} \end{document} diff --git a/input/regression/lilypond-book/tex-include-options.lytex b/input/regression/lilypond-book/tex-include-options.lytex index a53fb5dcd0..99934bf049 100644 --- a/input/regression/lilypond-book/tex-include-options.lytex +++ b/input/regression/lilypond-book/tex-include-options.lytex @@ -1,5 +1,5 @@ \documentclass{article} \begin{document} -Including Lilypond file with options (quote and noindent): +Including a LilyPond file with options (quote and noindent): \lilypondfile[quote,noindent]{include2.ly} \end{document} diff --git a/input/regression/lilypond-book/tex-inline-lilypond.lytex b/input/regression/lilypond-book/tex-inline-lilypond.lytex index 0d4886a5b0..cdc6c60c66 100644 --- a/input/regression/lilypond-book/tex-inline-lilypond.lytex +++ b/input/regression/lilypond-book/tex-inline-lilypond.lytex @@ -1,4 +1,4 @@ \documentclass{article} \begin{document} -Adding Lilypond code inline: \lilypond[relative=2]{ d g ceses } +Adding LilyPond code inline: \lilypond[relative=2]{ d g ceses } \end{document} diff --git a/input/regression/lilypond-book/tex-lilypond-inside-itemize.lytex b/input/regression/lilypond-book/tex-lilypond-inside-itemize.lytex index 91d78bb60f..59ac7127ab 100644 --- a/input/regression/lilypond-book/tex-lilypond-inside-itemize.lytex +++ b/input/regression/lilypond-book/tex-lilypond-inside-itemize.lytex @@ -2,7 +2,7 @@ \begin{document} -\section{Lilypond snippets inside lists:} +\section{LilyPond snippets inside lists:} Itemize environment: \begin{itemize} diff --git a/input/regression/lilypond-book/tex-lilypond-inside-table.lytex b/input/regression/lilypond-book/tex-lilypond-inside-table.lytex index a75c4df735..9723b35bd5 100644 --- a/input/regression/lilypond-book/tex-lilypond-inside-table.lytex +++ b/input/regression/lilypond-book/tex-lilypond-inside-table.lytex @@ -2,7 +2,7 @@ \begin{document} -\section{Lilypond snippets inside tables:} +\section{LilyPond snippets inside tables:} Tables: diff --git a/input/regression/lilypond-book/tex-musicxml-file-options.lytex b/input/regression/lilypond-book/tex-musicxml-file-options.lytex index 154ed6646a..daf1aa5586 100644 --- a/input/regression/lilypond-book/tex-musicxml-file-options.lytex +++ b/input/regression/lilypond-book/tex-musicxml-file-options.lytex @@ -1,5 +1,5 @@ \documentclass{article} \begin{document} -Including MusicMXL file: +Including a MusicXML file with options: \musicxmlfile[language=deutsch,absolute,no-beaming]{include.xml} \end{document} diff --git a/input/regression/lilypond-book/tex-musicxml-file.lytex b/input/regression/lilypond-book/tex-musicxml-file.lytex index 2995b35cb3..f1df08562a 100644 --- a/input/regression/lilypond-book/tex-musicxml-file.lytex +++ b/input/regression/lilypond-book/tex-musicxml-file.lytex @@ -1,5 +1,5 @@ \documentclass{article} \begin{document} -Including MusicMXL file: +Including a MusicXML file without options: \musicxmlfile{include.xml} \end{document} diff --git a/input/regression/lilypond-book/tex-paragraphs.lytex b/input/regression/lilypond-book/tex-paragraphs.lytex index da2452981e..f46683a15c 100644 --- a/input/regression/lilypond-book/tex-paragraphs.lytex +++ b/input/regression/lilypond-book/tex-paragraphs.lytex @@ -17,7 +17,7 @@ text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text -Next has no empty lines. +The next music has no surrounding empty lines. text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text diff --git a/input/regression/lilypond-book/tex-snippet-options.lytex b/input/regression/lilypond-book/tex-snippet-options.lytex index 1f175af37e..17f41dc8b7 100644 --- a/input/regression/lilypond-book/tex-snippet-options.lytex +++ b/input/regression/lilypond-book/tex-snippet-options.lytex @@ -4,32 +4,41 @@ \section{Snippet options} -Fragment: +This document shows the effect of various snippet options. + +The fragment option: + \begin{lilypond}[fragment] -c d e %\score +c' d' e' %\score \end{lilypond} -This shows the verbatim option: +The verbatim option: + \begin{lilypond}[fragment,verbatim] c' d' e' \end{lilypond} -printfilename: +The printfilename option: + \lilypondfile[printfilename]{include.ly} -staffsize: +The staffsize option: + \begin{lilypond}[staffsize=7,fragment] \context Voice <> \end{lilypond} \lilypond[fragment,staffsize=7]{\context Voice <>} -relative: +The relative option: + \lilypond[relative=1]{ c4 f b e } -quote: -\lilypond[quote,fragment]{\relative c' c1 } +The quote option: + +\lilypond[quote,fragment]{\relative c' c1 d4 c d e} + +Combining fragment, quote, staffsize=26, and verbatim options: -fragment, quote, staffsize=26, verbatim: \begin{lilypond}[fragment,quote,staffsize=26,verbatim] c'4 f16 \end{lilypond} diff --git a/input/regression/lilypond-book/tex-twocolumn.lytex b/input/regression/lilypond-book/tex-twocolumn.lytex index 69c10bb7be..b0f759f803 100644 --- a/input/regression/lilypond-book/tex-twocolumn.lytex +++ b/input/regression/lilypond-book/tex-twocolumn.lytex @@ -1,16 +1,39 @@ \documentclass[a4paper, 12pt]{article} -\begin{document} \twocolumn +\begin{document} \section{A latex file with two columns} -In this example, the width auto-detection shall detect the two columns -and produce snippets that have the smaller width for a column! +In this example, the width autodetection should detect the two-column +settings in the preamble of the document and produce snippets that +have the width of a column. + +\begin{lilypond} +\score{ + \relative c'{c d e f g a b c | c, d e f g a b c | c, d e f g a b c} +} +\end{lilypond} + +Wraping at the end of a column is similar to wraping at the end of a +page. + +Text text text text text text text text text text text text text text +text text text text text text text text text text text text text text +text text text text text text text text text text text text text text +text text text text text text text text text text text text text text +text text text text text text text text text text text text text text +text text text text text text text text text text text text text text +text. + +Text text text text text text text text text text text text text text +text text text text text text text text text text text text text text +text text text text text text text text text text text text text text +text. \begin{lilypond} \score{ - \relative c'{c d e f g a b c | c d e f g a b c | c d e f g a b c} + \relative c'{c d e f g a b c | c, d e f g a b c | c, d e f g a b c} } \end{lilypond} diff --git a/input/regression/lilypond-book/tex-verbatim.lytex b/input/regression/lilypond-book/tex-verbatim.lytex index 363138d454..efd6e7baa7 100644 --- a/input/regression/lilypond-book/tex-verbatim.lytex +++ b/input/regression/lilypond-book/tex-verbatim.lytex @@ -9,11 +9,15 @@ This file should not contain (and produce) any lilypond images! Snippets inside a verbatim environment or a comment are not run through lilypond, but left as is. +You should see the begin/end lilypond commands in all three of the below tests. + % TODO: These do not yet work, as \verb is explicitly disabled in lilypond-book for now! % \verb|\lilypond[fragment]{c' d' e'}| % % and +The verbatim environment does not confuse lilypond-book: + \begin{verbatim} \begin{lilypond} c d e @@ -21,9 +25,6 @@ c d e \end{verbatim} -As you can see, the begin/end lilypond commands inside -do not confuse lilypond-book. - % TODO: These do not yet work, as \verb is explicitly disabled in lilypond-book for now! % \verb|\begin{lilypond}[fragment]c d e\end{lilypond}| diff --git a/input/regression/lilypond-book/tex-version.lytex b/input/regression/lilypond-book/tex-version.lytex index 9509cc8a31..8573dfa8b7 100644 --- a/input/regression/lilypond-book/tex-version.lytex +++ b/input/regression/lilypond-book/tex-version.lytex @@ -1,4 +1,4 @@ \documentclass{article} \begin{document} -Lilypond version: \lilypondversion +LilyPond version: \lilypondversion \end{document} diff --git a/input/regression/lilypond-book/texinfo-include-language-detection.tely b/input/regression/lilypond-book/texinfo-include-language-detection.tely index d4c4c1e396..55bb5c4e73 100644 --- a/input/regression/lilypond-book/texinfo-include-language-detection.tely +++ b/input/regression/lilypond-book/texinfo-include-language-detection.tely @@ -8,6 +8,11 @@ @node Top @top Texinfo language detection +@macro lydoctitle {TEXT} +@need 600 +@emph{\TEXT\} +@end macro + @include texinfo-include-language-detection-included.itely @bye diff --git a/input/regression/lilypond-book/texinfo-language-detection.tely b/input/regression/lilypond-book/texinfo-language-detection.tely index 7bf5289342..cf5adc868d 100644 --- a/input/regression/lilypond-book/texinfo-language-detection.tely +++ b/input/regression/lilypond-book/texinfo-language-detection.tely @@ -8,6 +8,11 @@ @node Top @top Texinfo language detection +@macro lydoctitle {TEXT} +@need 600 +@emph{\TEXT\} +@end macro + The texidoc of the following snippet should be "translated": @lilypondfile[printfilename,texidoc,doctitle]{include3.ily} diff --git a/input/regression/lilypond-book/texinfo-musicxml-file-options.tely b/input/regression/lilypond-book/texinfo-musicxml-file-options.tely index 85454531fb..3a753a730e 100644 --- a/input/regression/lilypond-book/texinfo-musicxml-file-options.tely +++ b/input/regression/lilypond-book/texinfo-musicxml-file-options.tely @@ -3,9 +3,9 @@ @settitle MusicXML inside texinfo @node Top -@top MusicMXL in texinfo +@top MusicXML in texinfo -MusicXML included in texinfo +A MusicXML file included in texinfo with options (language=deutsch, absolute, no-beaming): @musicxmlfile[language=deutsch,absolute,no-beaming]{include.xml} diff --git a/input/regression/lilypond-book/texinfo-musicxml-file.tely b/input/regression/lilypond-book/texinfo-musicxml-file.tely index 8ff23841f2..09391e2c09 100644 --- a/input/regression/lilypond-book/texinfo-musicxml-file.tely +++ b/input/regression/lilypond-book/texinfo-musicxml-file.tely @@ -3,9 +3,9 @@ @settitle MusicXML inside texinfo @node Top -@top MusicMXL in texinfo +@top MusicXML in texinfo -MusicXML included in texinfo +A MusicXML file included in texinfo without any options: @musicxmlfile{include.xml} diff --git a/input/regression/lilypond-book/papersize-docs.tely b/input/regression/lilypond-book/texinfo-papersize-docs.tely similarity index 98% rename from input/regression/lilypond-book/papersize-docs.tely rename to input/regression/lilypond-book/texinfo-papersize-docs.tely index e47e57fb25..9120bb6e53 100644 --- a/input/regression/lilypond-book/papersize-docs.tely +++ b/input/regression/lilypond-book/texinfo-papersize-docs.tely @@ -1,4 +1,4 @@ -\input texinfo @c -*- coding: utf-8; mode: texinfo; documentlanguage: es -*- +\input texinfo @c -*- coding: utf-8; mode: texinfo; documentlanguage: en -*- @setfilename papersize-docs.info @settitle Different paper sizes for documentation @documentencoding UTF-8 -- 2.39.2