]> git.donarmstrong.com Git - lilypond.git/commitdiff
Build: Run regression tests for lilypond-book (issue 2223).
authorJulien Rioux <jrioux@physics.utoronto.ca>
Sun, 22 Jan 2012 00:56:25 +0000 (19:56 -0500)
committerJulien Rioux <jrioux@physics.utoronto.ca>
Mon, 13 Feb 2012 14:07:42 +0000 (09:07 -0500)
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.

26 files changed:
input/regression/lilypond-book/GNUmakefile
input/regression/lilypond-book/html-newline-after-tag.html
input/regression/lilypond-book/html-space-after-tag.html
input/regression/lilypond-book/html-version-newline.html
input/regression/lilypond-book/html-version.html
input/regression/lilypond-book/include3.ily
input/regression/lilypond-book/papersize-docs.tely [deleted file]
input/regression/lilypond-book/tex-comment-firstline.lytex
input/regression/lilypond-book/tex-graphics-package-added.lytex
input/regression/lilypond-book/tex-include-file.lytex
input/regression/lilypond-book/tex-include-options.lytex
input/regression/lilypond-book/tex-inline-lilypond.lytex
input/regression/lilypond-book/tex-lilypond-inside-itemize.lytex
input/regression/lilypond-book/tex-lilypond-inside-table.lytex
input/regression/lilypond-book/tex-musicxml-file-options.lytex
input/regression/lilypond-book/tex-musicxml-file.lytex
input/regression/lilypond-book/tex-paragraphs.lytex
input/regression/lilypond-book/tex-snippet-options.lytex
input/regression/lilypond-book/tex-twocolumn.lytex
input/regression/lilypond-book/tex-verbatim.lytex
input/regression/lilypond-book/tex-version.lytex
input/regression/lilypond-book/texinfo-include-language-detection.tely
input/regression/lilypond-book/texinfo-language-detection.tely
input/regression/lilypond-book/texinfo-musicxml-file-options.tely
input/regression/lilypond-book/texinfo-musicxml-file.tely
input/regression/lilypond-book/texinfo-papersize-docs.tely [new file with mode: 0644]

index 6081f7fe36d84daf75f222b41d94ae2b7841b816..a1b4dd6b623da24108f431ffe09bf125a4bebb42 100644 (file)
@@ -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:
index 2ad549cab82e7dc3f8917d453d003799721039ac..1f5b82662efa18b61a50266900ead703ba895428 100644 (file)
@@ -1,6 +1,6 @@
 <html>
 <body>
-Lilypond fragment with newlines before the end tags.
+A LilyPond fragment with newlines before the end tags.
 <lilypond fragment relative=2
 >
 \key c \minor c4 es g2
index a0be117f61938158d6c6b524ef9742312f286130..50edb7da3fa1a29f69a5ae85baebda8458e6ba8d 100644 (file)
@@ -1,6 +1,6 @@
 <html>
 <body>
-Lilypond fragment with spaces and tabs before the end tags.
+A LilyPond fragment with spaces and tabs before the end tags.
 <lilypond fragment relative=2     >
 \key c \minor c4 es g2
 </lilypond     >
index 8519705199b174ae841683d286e016c781f7f527..58bb007fe0542e602d4ce517785a6f9c52b6bb37 100644 (file)
@@ -1,6 +1,6 @@
 <html>
 <body>
-Lilypond version: <lilypondversion
+LilyPond version: <lilypondversion
 />
 </body>
 </html>
index 3fdc33272d1adac329a97dcaba89908a9c0c864b..c4a58be45edf7f4a772bbf6928f6ae186243e928 100644 (file)
@@ -1,5 +1,5 @@
 <html>
 <body>
-Lilypond version: <lilypondversion/>
+LilyPond version: <lilypondversion/>
 </body>
 </html>
index 0b877e32517bf65e743840ab60fc0ba62d83dbef..5cb7ef23533cd84df05754bc37b0fc067820d3d4 100644 (file)
@@ -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/papersize-docs.tely b/input/regression/lilypond-book/papersize-docs.tely
deleted file mode 100644 (file)
index e47e57f..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-\input texinfo @c -*- coding: utf-8; mode: texinfo; documentlanguage: es -*-
-@setfilename papersize-docs.info
-@settitle Different paper sizes for documentation
-@documentencoding UTF-8
-@documentlanguage en
-@afourpaper
-
-@node Top
-@top Different paper sizes for documentation.
-
-This is a sample of a small papersize, which is useful when you
-want to add a @code{\book@{@}} around some input.
-
-@lilypond[verbatim,papersize=a8landscape]
-\book {
-  \header {
-    title = "A scale in LilyPond"
-  }
-  \score {
-    \relative c' {
-      c4 d e f
-    }
-  }
-}
-@end lilypond
-
-Here is a different paper size, and a changed tagline.
-
-@lilypond[verbatim,quote,papersize=a8]
-\book {
-  \header {
-    title = "A scale in LilyPond"
-    tagline = "... music notation for Everyone"
-  }
-  \score {
-    \relative c' {
-      c4 d e f
-    }
-  }
-}
-@end lilypond
-
-@bye
index 5d0ae0c0a3699123e41f66b6c304748bf92beba5..f14873fff0df0b916de87052da8e0a658bde9428 100644 (file)
@@ -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}
index d94360ab54a3453abb768ff402c9219010d130ff..b4b51b31cb468c41bd719f02e29b35192f5738d0 100644 (file)
@@ -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.
index 6705a7ff14b886948df1e2f8ea343f2a1942b8e2..1045df472972769ddb09fd302c91352451b0ac87 100644 (file)
@@ -1,5 +1,5 @@
 \documentclass{article}
 \begin{document}
-Including Lilypond file:
+Including a LilyPond file without any options:
 \lilypondfile{include2.ly}
 \end{document}
index a53fb5dcd0c70255758689b002e654a4c47725c6..99934bf049567a4adb88854b47868e45c813f6d7 100644 (file)
@@ -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}
index 0d4886a5b0a7d3243178eb11cb181d5339475e25..cdc6c60c66336ea62452b5aac8f7e7eed46f8bd1 100644 (file)
@@ -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}
index 91d78bb60fd5eb521c35e70d2e7e6a0915057079..59ac7127ab1f8335d41054c853d3797b017b7f18 100644 (file)
@@ -2,7 +2,7 @@
 
 \begin{document}
 
-\section{Lilypond snippets inside lists:}
+\section{LilyPond snippets inside lists:}
 
 Itemize environment:
 \begin{itemize}
index a75c4df735ff36b47afbae1efd4efe1fc97c54aa..9723b35bd5d9c7e2ca572ad681978b5de8e1493d 100644 (file)
@@ -2,7 +2,7 @@
 
 \begin{document}
 
-\section{Lilypond snippets inside tables:}
+\section{LilyPond snippets inside tables:}
 
 Tables:
 
index 154ed6646a20813cfd1095133baff530f03fe4af..daf1aa55869852d14062f0b403c0838ac4bff3a3 100644 (file)
@@ -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}
index 2995b35cb38c99a905cf1f9f0b8a38c937693cab..f1df08562a4a957daa1143f86153388ca8092287 100644 (file)
@@ -1,5 +1,5 @@
 \documentclass{article}
 \begin{document}
-Including MusicMXL file:
+Including a MusicXML file without options:
 \musicxmlfile{include.xml}
 \end{document}
index da2452981ed9698e47a606b48b506cd1158aace3..f46683a15c069576d86c74bbb048c0d6e29fe8e6 100644 (file)
@@ -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
index 1f175af37e2131830f2f547a35f67ffc37876641..17f41dc8b709a9913d6b2b35045ac8ff5df16f6e 100644 (file)
@@ -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 <<c' e' g'>>
 \end{lilypond}
 \lilypond[fragment,staffsize=7]{\context Voice <<c' es' g'>>}
 
-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}
index 69c10bb7be73d5051b974447d9d70ccbbf19b2ec..b0f759f803cfe6079c2dce7c077bde645fa67ef3 100644 (file)
@@ -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}
 
index 363138d454ef66087c6cdb60e3717b3ad477d162..efd6e7baa779d4d2f5c9ad9dcc2a8e82378173e8 100644 (file)
@@ -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}|
 
index 9509cc8a31fd8409e4fc34a7902628f0f71d8cdc..8573dfa8b79e16e22036f436b9f16e923705d20f 100644 (file)
@@ -1,4 +1,4 @@
 \documentclass{article}
 \begin{document}
-Lilypond version: \lilypondversion
+LilyPond version: \lilypondversion
 \end{document}
index d4c4c1e3968c8674d2a7c0ba5995ee0017c8f3d3..55bb5c4e734a095ae33076050ea225bea363a034 100644 (file)
@@ -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
index 7bf528934286e95de34e949b9f2ebd4608da9847..cf5adc868dcf6a33cae80a61516e43bcdf583e55 100644 (file)
@@ -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}
 
index 85454531fb38c8f6bb4a7a51c11e58d6fde5b75e..3a753a730e6af46b23b0cfe68bacc1e18398d7fb 100644 (file)
@@ -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}
 
 
index 8ff23841f263920c60e5e1932f966e84802d308e..09391e2c098c264e99f73ed7b50f2fa0fda4b806 100644 (file)
@@ -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/texinfo-papersize-docs.tely b/input/regression/lilypond-book/texinfo-papersize-docs.tely
new file mode 100644 (file)
index 0000000..9120bb6
--- /dev/null
@@ -0,0 +1,43 @@
+\input texinfo @c -*- coding: utf-8; mode: texinfo; documentlanguage: en -*-
+@setfilename papersize-docs.info
+@settitle Different paper sizes for documentation
+@documentencoding UTF-8
+@documentlanguage en
+@afourpaper
+
+@node Top
+@top Different paper sizes for documentation.
+
+This is a sample of a small papersize, which is useful when you
+want to add a @code{\book@{@}} around some input.
+
+@lilypond[verbatim,papersize=a8landscape]
+\book {
+  \header {
+    title = "A scale in LilyPond"
+  }
+  \score {
+    \relative c' {
+      c4 d e f
+    }
+  }
+}
+@end lilypond
+
+Here is a different paper size, and a changed tagline.
+
+@lilypond[verbatim,quote,papersize=a8]
+\book {
+  \header {
+    title = "A scale in LilyPond"
+    tagline = "... music notation for Everyone"
+  }
+  \score {
+    \relative c' {
+      c4 d e f
+    }
+  }
+}
+@end lilypond
+
+@bye