]> git.donarmstrong.com Git - lilypond.git/blob - input/regression/markup-cyclic-reference.ly
Issue 5167/6: Changes: show \markup xxx = ... \etc assignments
[lilypond.git] / input / regression / markup-cyclic-reference.ly
1 \version "2.19.13"
2 #(ly:set-option 'warning-as-error #f)
3 #(ly:expect-warning (ly:translate-cpp-warning-scheme "Markup depth exceeds maximal value of %d; Markup: %s") 1024 'cycle-markup)
4 #(ly:expect-warning (ly:translate-cpp-warning-scheme "Markup depth exceeds maximal value of %d; Markup: %s") 1024 'cycleII-markup)
5
6 \header {
7   texidoc = "Cyclic markup definitions should cause a warning, but
8 not crash LilyPond with an endless loop"
9 }
10
11 % A simple markup function that calls itself in a loop.
12 #(define-markup-command (cycle layout props m)
13   (markup?)
14   (interpret-markup layout props (make-cycle-markup m)))
15
16 % Two simple markup functions that call each other in a loop.
17 #(define-markup-command (cycleI layout props m)
18   (markup?)
19   (interpret-markup layout props (make-cycleII-markup m)))
20 #(define-markup-command (cycleII layout props m)
21   (markup?)
22   (interpret-markup layout props (make-cycleI-markup m)))
23
24
25 \markup { \cycle "a" }
26 \markup { \cycleI "a" }