From: janneke <janneke>
Date: Tue, 23 Jul 2002 21:33:17 +0000 (+0000)
Subject: New file.
X-Git-Tag: release/1.5.71~105
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=188c479b9e2a49da18cdeda7b3fd26b7e4c3ec5b;p=lilypond.git

New file.
---

diff --git a/input/test/count-systems.ly b/input/test/count-systems.ly
new file mode 100644
index 0000000000..5869fcad6f
--- /dev/null
+++ b/input/test/count-systems.ly
@@ -0,0 +1,37 @@
+\header{
+    
+    texidoc="Display the number of systems, or the system number of a
+    Grob.  This can be most useful to assertain that a piece uses a
+    specified number of lines."
+    
+}
+
+#(define (display-systemno smob)
+  (let* ((this-line (Grob::line_scm smob))
+	 (systems (Spanner::get_broken_into
+		   (Grob::original_scm this-line))))
+    (display smob)
+    (display (list-index systems this-line))
+    (newline)))
+  
+
+#(define (display-system-count smob)
+  (display (length
+	    (Spanner::get_broken_into
+	     (Grob::original_scm
+	      (Grob::line_scm smob))))))
+
+  
+  
+\score{
+    \notes\relative c''{
+	\property Thread.NoteHead \override #'after-line-breaking-callback
+	% = #display-system-count
+	= #display-systemno
+	c1
+	d
+    }
+    \paper{ indent = 0.0\mm
+	    linewidth = 10.0\mm
+	}
+}
\ No newline at end of file