From: Jan Nieuwenhuizen Date: Wed, 19 Jun 2002 11:44:40 +0000 (+0000) Subject: really add X-Git-Tag: release/1.5.62~6 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e2dc3a560f914a740e1cf2dc6b0fed5ef935e81b;p=lilypond.git really add --- diff --git a/input/test/duration-check.ly b/input/test/duration-check.ly new file mode 100644 index 0000000000..902a1310e6 --- /dev/null +++ b/input/test/duration-check.ly @@ -0,0 +1,43 @@ +#(define (duration-check music) + "Check all rest durations in MUSIC" + + (let* ((name (ly-music-name music)) + (elts (ly-get-mus-property music 'elements)) + (e (ly-get-mus-property music 'element)) + (duration (ly-get-mus-property music 'duration))) + + (if (not (equal? '() duration)) + (begin + (write "duration: " (current-error-port)) + (write duration (current-error-port)) + (newline (current-error-port))) + + (if (equal? name "Rest_req") + (begin + (write "URG" (current-error-port)) + (write name (current-error-port)) + (write music (current-error-port)) + (newline (current-error-port)) + ;;(scm-error 'system-error #f "urg" #f #f))) + (error "boo") + ))) + + (if (pair? elts) + (map duration-check elts)) + + (if (music? e) + (duration-check e))) + + music) + +\score { + \apply #duration-check + < + \notes\relative c'' { + a b8 c16 + } + \notes\relative c'' { + a b8 c16 d a2 r + } + > +}