]> git.donarmstrong.com Git - lilypond.git/commitdiff
Revert "Allow header/footer snippets in test cases, expand lilypond-book to insert...
authorReinhold Kainhofer <reinhold@kainhofer.com>
Tue, 9 Oct 2007 22:50:27 +0000 (00:50 +0200)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Tue, 9 Oct 2007 22:50:27 +0000 (00:50 +0200)
This reverts commit 47c4f0bf5eb5be69826b23fd9be5bbc48765ef41.

buildscripts/lys-to-tely.py
input/regression/AAA-intro-regression-texi [deleted file]
input/regression/AAA-intro-regression.ly [new file with mode: 0644]
input/regression/GNUmakefile
input/regression/musicxml/GNUmakefile
input/regression/musicxml/intro-texi [deleted file]
make/lilypond-vars.make
make/lysdoc-rules.make
scripts/lilypond-book.py

index c0a66457a95b5d33bf8dfa46b0a36b61ad10c3cb..9150acfe393296ab87ba34e95cdf3cce9e2712ba 100644 (file)
@@ -6,6 +6,7 @@ TODO:
 
  * Add @nodes, plit at sections?
  * Less kludged first introduction file
+ * include *.texi files for text at start of section?
 
 '''
 
@@ -23,21 +24,17 @@ Construct tely doc from LY-FILEs.
 
 Options:
  -h, --help                print this help
- -n, --name=NAME         write tely doc to NAME
+ -o, --output=NAME         write tely doc to NAME
  -t, --title=TITLE         set tely doc title TITLE
- -i, --introduction=FILE   use FILE as intruduction at the top
- -f, --footer=FILE         use FILE as footer on the bottom of the page
 
 """)
     sys.exit (0)
 
-(options, files) = getopt.getopt(sys.argv[1:], 'hn:t:i:f:', [
-    'help', 'name=', 'title=', 'introduction=', 'footer='])
+(options, files) = getopt.getopt(sys.argv[1:], 'hn:t:', [
+    'help', 'name=', 'title='])
 
 name="ly-doc"
 title="Ly Doc"
-header = None
-footer = None
 for opt in options:
     o = opt[0]
     a = opt[1]
@@ -47,10 +44,6 @@ for opt in options:
         name = a
     elif o == '-t' or o == '--title':
         title = a
-    elif o == '-i' or o == '--introduction':
-        header = a
-    elif o == '-f' or o == '--footer':
-        footer = a
     else:
         raise 'unknown opt ', o
 
@@ -86,11 +79,6 @@ if files:
 @node Top, , , (dir)
 ''' % (name, title, title)
 
-    if header:
-        header_text = open (header).read ()
-        s += header_text
-
-
     def name2line (n):
         # UGR
         s = r"""
@@ -105,12 +93,7 @@ if files:
         return s
     files.sort ()
     s = s + string.join (map (lambda x: name2line (x), files), "\n")
-    s += '\n'
-    if footer:
-        footer_text = open (footer).read ()
-        s += footer_text
-        s += '\n'
-    s = s + '@bye\n'
+    s = s + '\n@bye\n'
     f = "%s/%s.tely" % (dir, name)
     sys.stderr.write ("%s: writing %s..." % (program_name, f))
     h = open (f, "w")
diff --git a/input/regression/AAA-intro-regression-texi b/input/regression/AAA-intro-regression-texi
deleted file mode 100644 (file)
index b270e6b..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-@unnumbered Introduction
-
-This document presents proofs for LilyPond @lilypondversion. When the
-text corresponds with the shown notation, we consider LilyPond Officially
-BugFree (tm).  This document is intended for finding bugs and for
-documenting bugfixes.
-
-In the web version of this document, you can click on the file name 
-or figure for each example to see the corresponding input file.
-
-TODO: order of tests (file names!), test only one feature per test.
-Smaller and neater tests.
-
diff --git a/input/regression/AAA-intro-regression.ly b/input/regression/AAA-intro-regression.ly
new file mode 100644 (file)
index 0000000..d19595b
--- /dev/null
@@ -0,0 +1,31 @@
+\version "2.10.0"
+%% +.ly: Be the first .ly file for lys-to-tely.py.
+%% Better to make lys-to-tely.py include "introduction.texi" or
+%% other .texi documents too?
+
+
+\header{
+texidoc =
+
+#(string-append "@unnumbered Introduction
+
+This document presents proofs for
+LilyPond " (lilypond-version) ".  When the
+text corresponds with the shown notation, we consider LilyPond Officially
+BugFree (tm).  This document is intended for finding bugs and for
+documenting bugfixes.
+
+In the web version of this document, you can click on the file name 
+or figure for each example to see the corresponding input file.
+
+TODO: order of tests (file names!), test only one feature per test.
+Smaller and neater tests.
+")
+
+}
+
+%
+% make sure the .png is generated.
+%
+\lyrics { "(left blank intentionally)" }
+
index a57130bf6385fe03195e04d5485097e23c1f10b3..753d483bd9674586a235df824d340bae816f184f 100644 (file)
@@ -5,7 +5,5 @@ LOCALSTEPMAKE_TEMPLATES=lilypond ly lysdoc
 
 include $(depth)/make/stepmake.make
 TITLE=LilyPond Regression Tests
-HEADER_FILE=AAA-intro-regression-texi
-FOOTER_FILE=
 
 SUBDIRS=musicxml
index a6809e8b336d5e24073ce75d2b65bbd203b783b8..ec647d85079d052b9ae5b3de558105274d6a75cc 100644 (file)
@@ -4,6 +4,5 @@ STEPMAKE_TEMPLATES=documentation texinfo tex
 LOCALSTEPMAKE_TEMPLATES=lilypond ly lysdoc musicxml
 
 include $(depth)/make/stepmake.make
-TITLE=Lilypond musicxml2ly Regression Tests
-HEADER_FILE=intro-texi
-FOOTER_FILE=
+TITLE=Lilypon musicxml2ly Regression Tests
+
diff --git a/input/regression/musicxml/intro-texi b/input/regression/musicxml/intro-texi
deleted file mode 100644 (file)
index ffbf320..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-@unnumbered MusicXML regression and coverage test
-
-This document presents proofs for the musicxml2ly script provided with
-LilyPond @lilypondversion. The files don't have a description yet, so 
-there is no official indication when the output is wrong.
-These snippets are provided as unit test files in MusicXML, converted to
-a .ly file by musicxml2ly and then processed by lilypond as usual.
-
-If something does not seem wright in the output, it might either be that this
-feature has not been implemented, has been wrongly implemented, or a regression
-has crept in recently...
-This document is intended for finding bugs and for documenting bugfixes.
-
-In the web version of this document, you can click on the file name 
-or figure for each example to see the corresponding .ly intermediary file.
-
-TODO: Find a way to add a description to the .ly files for texinfo.
-
index fe8820bd0b7945b004e8ad3bbc91e2776dbdc9a5..cf9093523b8b861933625e4de73347eb29c4a91c 100644 (file)
@@ -22,7 +22,7 @@ the-script-dir=$(wildcard $(script-dir))
 ABC2LY = $(script-dir)/abc2ly.py
 MUSICXML2LY = $(script-dir)/musicxml2ly.py
 CONVERT_LY = $(script-dir)/convert-ly.py
-LILYPOND_BOOK = $(script-dir)/out/lilypond-book
+LILYPOND_BOOK = $(script-dir)/lilypond-book.py
 
 ## ugh : fix me, input/new/pitch
 LILYPOND_BOOK_INCLUDES = -I $(src-dir)/ -I $(outdir) -I $(input-dir) -I $(input-dir)/regression/ -I $(input-dir)/manual/ -I $(input-dir)/tutorial/ -I $(top-build-dir)/mf/$(outconfbase)/  -I $(top-build-dir)/mf/out/ -I $(input-dir)/new/pitch
index 331231e8e6fb75fc7b5e879d51316d0dce1c1e49..21c675e84897a447804608e801d9525a62092b23 100644 (file)
@@ -1,4 +1,4 @@
 
 $(outdir)/collated-files.tely: $(LY_FILES) $(OUT_LY_FILES)
-       $(PYTHON) $(buildscript-dir)/lys-to-tely.py --name=$(outdir)/collated-files --introduction="$(HEADER_FILE)" --footer="$(FOOTER_FILE)" --title="$(TITLE)" $^
+       $(PYTHON) $(buildscript-dir)/lys-to-tely.py --name=$(outdir)/collated-files --title="$(TITLE)" $^
 
index 459900124169d8109192904393938e8c4b0f1c13..5b9c0d738f9b9669ee43eba424060a7b9a3cb423 100644 (file)
@@ -248,9 +248,6 @@ snippet_res = {
           (?P<match>
           <(?P<inline>(inline)?)mediaobject>\s*<imageobject.*?>\s*<imagedata\s+fileref="(?P<filename>.*?\.ly)"\s*(role="(?P<options>.*?)")?\s*(/>|>\s*</imagedata>)\s*</imageobject>\s*</(inline)?mediaobject>)''',
 
-        'lilypond_version':
-         no_match,
-
         'multiline_comment':
          r'''(?smx)
           (?P<match>
@@ -266,6 +263,7 @@ snippet_res = {
 
         'verbatim':
        no_match,
+       
     }, 
     ##
     HTML: {
@@ -298,9 +296,6 @@ snippet_res = {
           \s*(?P<filename>.*?)\s*
           </lilypondfile>)''',
 
-        'lilypond_version':
-         r'''(?mx)(?P<match><lilypond-version>)''',
-
         'multiline_comment':
          r'''(?smx)
           (?P<match>
@@ -367,9 +362,6 @@ snippet_res = {
            (?P<filename>\S+?)
           })''',
 
-        'lilypond_version':
-         r'''(?P<match>\\lilypond_version)''',
-
         'multiline_comment':
          no_match,
 
@@ -438,9 +430,6 @@ snippet_res = {
            (?P<filename>\S+)
           })''',
 
-        'lilypond_version':
-         r'''(?mx)(?P<match>@lilypondversion)''',
-
         'multiline_comment':
          r'''(?smx)
           ^(?P<match>
@@ -1286,14 +1275,9 @@ class Lilypond_file_snippet (Lilypond_snippet):
         return ('\\sourcefilename \"%s\"\n\\sourcefileline 0\n%s'
                 % (name, contents))
 
-class Version_snippet (Snippet):
-    def replacement_text (self):
-        return (program_version)
-
 snippet_type_to_class = {
     'lilypond_file': Lilypond_file_snippet,
     'lilypond_block': Lilypond_snippet,
-    'lilypond_version': Version_snippet,
     'lilypond': Lilypond_snippet,
     'include': Include_snippet,
 }
@@ -1704,7 +1688,6 @@ def do_file (input_filename):
     #                'verb',
             'singleline_comment',
             'lilypond_file',
-            'lilypond_version',
             'include',
             'lilypond',
         )