]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/regression/display-lily-tests.ly
Merge commit 'origin' into beamlets2
[lilypond.git] / input / regression / display-lily-tests.ly
index a6b1dacac74c4d93321e84a85b7620d059e9b5c4..f8e49a1cb371353f9fbfb2312b55e37ece721fd7 100644 (file)
@@ -1,12 +1,12 @@
-\version "2.11.6"
-
+\version "2.12.0"
 #(use-modules (srfi srfi-13)
               (ice-9 format))
 
 %%%
 %%% Testing utilities
 %%%
-
+#(use-modules (scm display-lily))
+#(memoize-clef-names supported-clefs)
 #(define (parse-lily-and-compute-lily-string chr port)
   (let ((lily-string (call-with-output-string
                       (lambda (out)
     (let ((input (car strings))
          (output (cdr strings)))
      (set! test-number (1+ test-number))
-     (if (string=? input output)
-         (make-music 'SequentialMusic 'void #t)
-         (make-music 'SequentialMusic
-           'elements
-           (list (ly:parser-lookup parser 'fatText)
-                 (make-music 'EventChord
-                   'elements (list (make-music 'LineBreakEvent
-                                     'break-permission 'force)))
-                 (make-music 'EventChord
-                   'elements (list (make-music 'SkipEvent
-                                     'duration (ly:make-duration 0 0 1 1))
-                                   (make-music 'TextScriptEvent
-                                     'direction -1
-                                     'text (markup #:column
-                                            (#:simple (format #f "Test #~a " test-number)
-                                             (if (string-null? result-info) 
-                                                 (markup #:bold "BUG") 
-                                                 (markup #:simple result-info))
-                                             #:typewriter (lily-string->markup input)
-                                             #:typewriter (lily-string->markup output)))))))))))))
-    
-
+     (if (not (equal? input output))
+         (ly:progress "Test ~a unequal: ~a. \nin  = ~a\nout = ~a\n"
+         test-number
+         (if result-info
+             result-info "BUG")
+          input output))
+     (make-music 'SequentialMusic 'void #t)))))
+         
 test = 
 #(define-music-function (parser location result-info strings) (string? pair?)
    (test-function parser location result-info strings))
@@ -64,24 +50,8 @@ test =
 %%% Tests
 %%%
 \header {
-  texidoc = \markup \column { \line { \typewriter display-lily-music unit tests }
-                              \line { Real bugs (regressions) are marked as \bold BUG. }
-                              \line { Known bugs are marked as TODO. } }
-}
-
-\layout {
-  raggedright = ##t 
-  indent = 0\cm
-  \context {
-    \Staff
-    \override StaffSymbol #'line-count = #1
-    \remove "Time_signature_engraver"
-    \remove "Clef_engraver"
-  }
-  \context {
-    \Score
-    \remove "Bar_number_engraver"
-  }
+  texidoc = "This is a test of the display-lily-music unit. Problems are reported on the
+stderr of this run." 
 }
 
 %% Sequential music
@@ -163,8 +133,8 @@ test =
 \test "" ##[ { c\<  c\!  c^\<  c^\!  c_\<  c_\!  } #]  % CrescendoEvent
 \test "" ##[ { c\>  c\!  c^\>  c^\!  c_\>  c_\!  } #]  % DecrescendoEvent
 \test "" ##[ { c\(  c\)  c^\(  c^\)  c_\(  c_\)  } #]  % PhrasingSlurEvent
-\test "" ##[ { c\sustainDown  c\sustainUp  } #] % SustainEvent
-\test "" ##[ { c\sostenutoDown  c\sostenutoUp  } #] % SostenutoEvent
+\test "" ##[ { c\sustainOn  c\sustainOff  } #] % SustainEvent
+\test "" ##[ { c\sostenutoOn  c\sostenutoOff  } #] % SostenutoEvent
 \test "" ##[ \melisma #]
 \test "" ##[ \melismaEnd #]
 \test "" ##[ { c\startTextSpan  c\stopTextSpan  } #] % TextSpanEvent
@@ -184,7 +154,7 @@ test =
 \test "" ##[ \noPageTurn #]
 
 %% Checks
-\test "" ##[ \octave a' #]                             % RelativeOctaveCheck
+\test "" ##[ \octaveCheck a' #]                                % RelativeOctaveCheck
 \test "" ##[ | #]                                      % BarCheck
 
 %% Marks
@@ -217,7 +187,6 @@ test =
 %% Repeats
 \test "" ##[ \repeat volta 2 { c d } #]                % VoltaRepeatedMusic
 \test "" ##[ \repeat unfold 2 { c d } #]               % UnfoldedRepeatedMusic
-\test "" ##[ \repeat fold 2 { c d } #]         % FoldedRepeatedMusic
 \test "" ##[ \repeat percent 2 { c d } #]              % PercentRepeatedMusic
 \test "" ##[ \repeat tremolo 4 { c16 d } #]            % TremoloRepeatedMusic
 \test "" ##[ \repeat volta 2 { c4 d } \alternative { { c d } { e f } } #] % 
@@ -260,3 +229,8 @@ test =
 %% Cue notes
 \test "" ##[ \cueDuring #"foo" #1 { c d } #]
 \test "" ##[ \quoteDuring #"foo" { c d } #]
+
+
+%% end test.
+
+#(read-hash-extend #\[ #f) %{ ] %}