]> git.donarmstrong.com Git - lilypond.git/commitdiff
regression tests for nonstandard staves
authorBenkő Pál <benko.pal@gmail.com>
Thu, 19 Jul 2012 20:24:46 +0000 (22:24 +0200)
committerBenkő Pál <benko.pal@gmail.com>
Thu, 9 Aug 2012 19:42:10 +0000 (21:42 +0200)
input/regression/repeat-sign-global-size-10.ly [new file with mode: 0644]
input/regression/repeat-sign-global-size-30.ly [new file with mode: 0644]
input/regression/repeat-sign-layout-size.ly [new file with mode: 0644]
input/regression/repeat-sign.ly [new file with mode: 0644]
input/regression/zero-staff-space.ly

diff --git a/input/regression/repeat-sign-global-size-10.ly b/input/regression/repeat-sign-global-size-10.ly
new file mode 100644 (file)
index 0000000..97c5d92
--- /dev/null
@@ -0,0 +1,43 @@
+\version "2.15.42"
+\header {
+  texidoc = "The two dots of a repeat sign should be symmetric
+to the staff centre and avoid staff lines even for exotic staves.
+Test set-global-staff size 10 (with layout-set-staff-size)."
+}
+
+#(set-global-staff-size 10)
+
+\score {
+  <<
+    \context Staff = "s1" \with {
+      \override StaffSymbol #'line-positions = #'(-4 -2 0 2)
+    } {
+      s1 \bar ":|"
+    }
+
+    \context Staff = "s2" \with {
+      \override StaffSymbol #'staff-space = #0.75
+    } {
+      s1 \bar ":|"
+    }
+  >>
+}
+
+\score {
+  <<
+    \context Staff = "s1" {
+      s1 \bar ":|"
+    }
+
+    \context Staff = "s2" \with {
+      \override StaffSymbol #'staff-space = #2
+      \override StaffSymbol #'line-count = #4
+    } {
+      s1 \bar ":|"
+    }
+  >>
+
+  \layout {
+    #(layout-set-staff-size 30)
+  }
+}
diff --git a/input/regression/repeat-sign-global-size-30.ly b/input/regression/repeat-sign-global-size-30.ly
new file mode 100644 (file)
index 0000000..e143d55
--- /dev/null
@@ -0,0 +1,46 @@
+\version "2.15.42"
+\header {
+  texidoc = "The two dots of a repeat sign should be symmetric
+to the staff centre and avoid staff lines even for exotic staves.
+Test set-global-staff size 30 (with layout-set-staff-size)."
+}
+
+#(set-global-staff-size 30)
+
+\score {
+  <<
+    \context Staff = "s1" \with {
+      \override StaffSymbol #'staff-space = #0.65
+    } {
+      s1 \bar ":|"
+    }
+
+    \context Staff = "s2" \with {
+      \override StaffSymbol #'staff-space = #0.7
+      \override StaffSymbol #'line-positions = #'(-4 -2 0 2)
+    } {
+      s1 \bar ":|"
+    }
+  >>
+}
+
+\score {
+  <<
+    \context Staff = "s1" \with {
+      \override StaffSymbol #'staff-space = #0.25
+    } {
+      s1 \bar ":|"
+    }
+
+    \context Staff = "s2" \with {
+      \override StaffSymbol #'staff-space = #0.3
+      \override StaffSymbol #'line-count = #4
+    } {
+      s1 \bar ":|"
+    }
+  >>
+
+  \layout {
+    #(layout-set-staff-size 10)
+  }
+}
diff --git a/input/regression/repeat-sign-layout-size.ly b/input/regression/repeat-sign-layout-size.ly
new file mode 100644 (file)
index 0000000..56ff720
--- /dev/null
@@ -0,0 +1,43 @@
+\version "2.15.42"
+\header {
+  texidoc = "The two dots of a repeat sign should be symmetric
+to the staff centre and avoid staff lines even for exotic staves.
+Test layout-set-staff-size."
+}
+
+\score {
+  <<
+    \context Staff = "s1" \with {
+      \override StaffSymbol #'staff-space = #0.4
+    } {
+      s1 \bar ":|"
+    }
+
+    \context Staff = "s2" \with {
+      \override StaffSymbol #'staff-space = #0.5
+    } {
+      s1 \bar ":|"
+    }
+  >>
+
+  \layout {
+    #(layout-set-staff-size 10)
+  }
+}
+
+\score
+{
+  <<
+    \context Staff = "s1" \with {
+      \override StaffSymbol #'staff-space = #0.7
+    } {
+      s1 \bar ":|"
+    }
+
+    \context Staff = "s2" \with {
+      \override StaffSymbol #'staff-space = #0.75
+    } {
+      s1 \bar ":|"
+    }
+  >>
+}
diff --git a/input/regression/repeat-sign.ly b/input/regression/repeat-sign.ly
new file mode 100644 (file)
index 0000000..09ed993
--- /dev/null
@@ -0,0 +1,139 @@
+\version "2.15.42"
+\header {
+  texidoc = "The two dots of a repeat sign should be symmetric
+to the staff centre and avoid staff lines even for exotic staves."
+}
+
+
+mus = \context Voice { \relative f' { d e f g \bar ":|" } }
+
+\new Staff {
+  <<
+    \mus
+    \context Voice { s1^"standard staff" }
+  >>
+}
+
+\new Staff \with {
+  \override StaffSymbol #'line-positions = #'(-6 -4 -2 0 2)
+} {
+  <<
+    \clef french
+    \mus
+    \context Voice { s1^"excentric staff" }
+  >>
+}
+
+\new Staff \with {
+  \override StaffSymbol #'line-count = #4
+} {
+  <<
+    \mus
+    \context Voice { s1^"standard four-line staff" }
+  >>
+}
+
+\new Staff \with {
+  \override StaffSymbol #'line-positions = #'(-2 0 2 4)
+} {
+  <<
+    \mus
+    \context Voice { s1^"excentric four-line staff" }
+  >>
+}
+
+\new Staff \with {
+  \override StaffSymbol #'line-positions = #'(-7 -4)
+} {
+  <<
+    \clef french
+    \mus
+    \context Voice { s1^"very excentric staff" }
+  >>
+}
+
+\new Staff \with {
+  \override StaffSymbol #'staff-space = #1.5
+  \override StaffSymbol #'line-positions = #'(-2 0)
+} {
+  <<
+    \mus
+    \context Voice { s1^"as wide as previous" }
+  >>
+}
+
+\new Staff \with {
+  \override StaffSymbol #'line-positions = #'(-2.9 -2)
+} {
+  <<
+    \mus
+    \context Voice { s1^"narrow staff" }
+  >>
+}
+
+\new Staff \with {
+  \override StaffSymbol #'line-positions = #'(-4 -3 -2)
+} {
+  <<
+    \mus
+    \context Voice { s1^"dense staff" }
+  >>
+}
+
+\new Staff \with {
+  \override StaffSymbol #'line-positions = #'(-4 -3 -2)
+  \override StaffSymbol #'staff-space = #0.8
+} {
+  <<
+    \mus
+    \context Voice { s1^"denser staff" }
+  >>
+}
+
+\new Staff \with {
+  \override StaffSymbol #'line-positions = #'(-6 -2 0 5)
+} {
+  <<
+    \mus
+    \context Voice { s1^"irregular staff, standard spacing" }
+  >>
+}
+
+\new Staff \with {
+  \override StaffSymbol #'line-positions = #'(-4 -2 -1)
+  \override StaffSymbol #'staff-space = #1.5
+} {
+  <<
+    \mus
+    \context Voice { s1^"irregular staff, nonstandard spacing" }
+  >>
+}
+
+\new Staff \with {
+  \override StaffSymbol #'thickness = #4
+} {
+  <<
+    \clef french
+    \mus
+    \context Voice {
+      s1^"thick-lined staff"
+    }
+  >>
+}
+
+\new Staff \with {
+  \override StaffSymbol #'line-positions = #'(-2)
+} {
+  <<
+    \mus
+    \context Voice { s1^"single line staff (zero height)" }
+  >>
+}
+
+\new Staff {
+  \stopStaff
+  <<
+    \mus
+    \context Voice { s1^"no staff" }
+  >>
+}
index 62e2e16bc9397d30801a09d3c26e9b4ef078fbb7..fc1c162c065aa3eafaffa0cdb16b6fff8b93de00 100644 (file)
@@ -10,6 +10,6 @@ Setting staff-space to 0 does not cause a segmentation fault.
   \override StaffSymbol #'staff-space = #0
   } {
   \relative c' {
-    c1
+    c1 \bar ":|"
   }
 }