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 'cycleI-markup)
7 texidoc = "Cyclic markup definitions should cause a warning, but
8 not crash LilyPond with an endless loop"
11 % A simple markup function that calls itself in a loop.
12 #(define-markup-command (cycle layout props m)
14 (interpret-markup layout props (make-cycle-markup m)))
16 % Two simple markup functions that call each other in a loop.
17 #(define-markup-command (cycleI layout props m)
19 (interpret-markup layout props (make-cycleII-markup m)))
20 #(define-markup-command (cycleII layout props m)
22 (interpret-markup layout props (make-cycleI-markup m)))
25 \markup { \cycle "a" }
26 \markup { \cycleI "a" }