From: Reinhold Kainhofer Date: Tue, 9 Oct 2007 22:50:27 +0000 (+0200) Subject: Revert "Allow header/footer snippets in test cases, expand lilypond-book to insert... X-Git-Tag: release/2.11.35-1~92 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=886f3292edde47e279c3b8f22cc00784d082d3a4;p=lilypond.git Revert "Allow header/footer snippets in test cases, expand lilypond-book to insert versionnumber" This reverts commit 47c4f0bf5eb5be69826b23fd9be5bbc48765ef41. --- diff --git a/buildscripts/lys-to-tely.py b/buildscripts/lys-to-tely.py index c0a66457a9..9150acfe39 100644 --- a/buildscripts/lys-to-tely.py +++ b/buildscripts/lys-to-tely.py @@ -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 index b270e6bccf..0000000000 --- a/input/regression/AAA-intro-regression-texi +++ /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 index 0000000000..d19595bf02 --- /dev/null +++ b/input/regression/AAA-intro-regression.ly @@ -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)" } + diff --git a/input/regression/GNUmakefile b/input/regression/GNUmakefile index a57130bf63..753d483bd9 100644 --- a/input/regression/GNUmakefile +++ b/input/regression/GNUmakefile @@ -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 diff --git a/input/regression/musicxml/GNUmakefile b/input/regression/musicxml/GNUmakefile index a6809e8b33..ec647d8507 100644 --- a/input/regression/musicxml/GNUmakefile +++ b/input/regression/musicxml/GNUmakefile @@ -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 index ffbf320639..0000000000 --- a/input/regression/musicxml/intro-texi +++ /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. - diff --git a/make/lilypond-vars.make b/make/lilypond-vars.make index fe8820bd0b..cf9093523b 100644 --- a/make/lilypond-vars.make +++ b/make/lilypond-vars.make @@ -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 diff --git a/make/lysdoc-rules.make b/make/lysdoc-rules.make index 331231e8e6..21c675e848 100644 --- a/make/lysdoc-rules.make +++ b/make/lysdoc-rules.make @@ -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)" $^ diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index 4599001241..5b9c0d738f 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -248,9 +248,6 @@ snippet_res = { (?P <(?P(inline)?)mediaobject>\s*\s*.*?\.ly)"\s*(role="(?P.*?)")?\s*(/>|>\s*)\s*\s*)''', - 'lilypond_version': - no_match, - 'multiline_comment': r'''(?smx) (?P @@ -266,6 +263,7 @@ snippet_res = { 'verbatim': no_match, + }, ## HTML: { @@ -298,9 +296,6 @@ snippet_res = { \s*(?P.*?)\s* )''', - 'lilypond_version': - r'''(?mx)(?P)''', - 'multiline_comment': r'''(?smx) (?P @@ -367,9 +362,6 @@ snippet_res = { (?P\S+?) })''', - 'lilypond_version': - r'''(?P\\lilypond_version)''', - 'multiline_comment': no_match, @@ -438,9 +430,6 @@ snippet_res = { (?P\S+) })''', - 'lilypond_version': - r'''(?mx)(?P@lilypondversion)''', - 'multiline_comment': r'''(?smx) ^(?P @@ -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', )