]> git.donarmstrong.com Git - lilypond.git/commitdiff
new regtests for dots of a repeat sign
authorBenkő Pál <benko.pal@gmail.com>
Fri, 7 Sep 2012 17:39:21 +0000 (19:39 +0200)
committerBenkő Pál <benko.pal@gmail.com>
Mon, 17 Sep 2012 18:20:27 +0000 (20:20 +0200)
- test default tablature
- test set-global-staff-size and layout-set-staff-size combinations
  in default and extreme circumstances to make sure that real world
  usage is not hindered

input/regression/repeat-sign-global-size-10.ly
input/regression/repeat-sign-global-size-30.ly
input/regression/repeat-sign-global-size-5.ly [new file with mode: 0644]
input/regression/repeat-sign-layout-size.ly
input/regression/repeat-sign.ly
input/regression/tablature-repeat.ly [new file with mode: 0644]

index 130a37f88a7b820d7d8df4f7eb265fcbf21ba9f3..3fea78a4a8b080a3034e5ca2f78522a19ce730cb 100644 (file)
@@ -10,31 +10,39 @@ Test set-global-staff size 10 (with layout-set-staff-size)."
 \score {
   <<
     \context Staff = "s1" \with {
-      \override StaffSymbol #'line-positions = #'(-4 -2 0 2)
-      \override StaffSymbol #'staff-space = #0.7
+      \override StaffSymbol #'staff-space = #0.6
     } {
       s1 \bar ":|"
     }
 
     \context Staff = "s2" \with {
-      \override StaffSymbol #'staff-space = #0.6
+      \override StaffSymbol #'line-positions = #'(-4 -2 0 2)
+      \override StaffSymbol #'staff-space = #0.7
     } {
       s1 \bar ":|"
     }
+
+    \context Staff = "s3" {
+      s1 \bar ":|"
+    }
   >>
 }
 
 \score {
   <<
-    \context Staff = "s1" \with {
-      \override StaffSymbol #'staff-space = #1.6
-    } {
+    \context Staff = "s1" {
       s1 \bar ":|"
     }
 
     \context Staff = "s2" \with {
       \override StaffSymbol #'staff-space = #1.7
-      \override StaffSymbol #'line-count = #4
+      \override StaffSymbol #'line-positions = #'(-4 -2 0 2)
+    } {
+      s1 \bar ":|"
+    }
+
+    \context Staff = "s3" \with {
+      \override StaffSymbol #'staff-space = #3
     } {
       s1 \bar ":|"
     }
index e7c404f0fac8a3cd11a3827aa6b6d439d119f949..f3ac22d60a432a5e149b3b422e9c847239548d28 100644 (file)
@@ -21,20 +21,28 @@ Test set-global-staff size 30 (with layout-set-staff-size)."
     } {
       s1 \bar ":|"
     }
+
+    \context Staff = "s3" {
+      s1 \bar ":|"
+    }
   >>
 }
 
 \score {
   <<
-    \context Staff = "s1" \with {
-      \override StaffSymbol #'staff-space = #0.25
-    } {
+    \context Staff = "s1" {
       s1 \bar ":|"
     }
 
     \context Staff = "s2" \with {
-      \override StaffSymbol #'staff-space = #0.2
-      \override StaffSymbol #'line-count = #4
+      \override StaffSymbol #'staff-space = #0.33
+    } {
+      s1 \bar ":|"
+    }
+
+    \context Staff = "s3" \with {
+      \override StaffSymbol #'staff-space = #0.33
+      \override StaffSymbol #'line-positions = #'(-4 -2 0 2)
     } {
       s1 \bar ":|"
     }
diff --git a/input/regression/repeat-sign-global-size-5.ly b/input/regression/repeat-sign-global-size-5.ly
new file mode 100644 (file)
index 0000000..cccfd56
--- /dev/null
@@ -0,0 +1,53 @@
+\version "2.17.2"
+\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 5)
+
+\score {
+  <<
+    \context Staff = "s1" \with {
+      \override StaffSymbol #'staff-space = #0.7
+    } {
+      s1 \bar ":|"
+    }
+
+    \context Staff = "s2" \with {
+      \override StaffSymbol #'line-positions = #'(-4 -2 0 2)
+    } {
+      s1 \bar ":|"
+    }
+
+    \context Staff = "s3" {
+      s1 \bar ":|"
+    }
+  >>
+}
+
+\score {
+  <<
+    \context Staff = "s1" {
+      s1 \bar ":|"
+    }
+
+    \context Staff = "s2" \with {
+      \override StaffSymbol #'staff-space = #3
+      \override StaffSymbol #'line-positions = #'(-4 -2 0 2)
+    } {
+      s1 \bar ":|"
+    }
+
+    \context Staff = "s3" \with {
+      \override StaffSymbol #'staff-space = #6
+    } {
+      s1 \bar ":|"
+    }
+  >>
+
+  \layout {
+    #(layout-set-staff-size 30)
+  }
+}
index 2cc5988a7d75bf79999d8289024209bd79dbb3d0..0856984dd7a262304978909f9853f4058338c63b 100644 (file)
@@ -18,6 +18,10 @@ Test layout-set-staff-size."
     } {
       s1 \bar ":|"
     }
+
+    \context Staff = "s3" {
+      s1 \bar ":|"
+    }
   >>
 
   \layout {
@@ -39,5 +43,9 @@ Test layout-set-staff-size."
     } {
       s1 \bar ":|"
     }
+
+    \context Staff = "s3" {
+      s1 \bar ":|"
+    }
   >>
 }
index 01775e29220e322701cc93a948017f1371205bea..b40c08d5908e6e1d7f5cd0f7301171fad2f46266 100644 (file)
@@ -43,7 +43,7 @@ mus = \context Voice { \relative f' { d e f g \bar ":|" } }
 }
 
 \new Staff \with {
-  \override StaffSymbol #'line-positions = #'(-7 -4)
+  \override StaffSymbol #'line-positions = #'(-8 -4)
 } {
   <<
     \clef french
@@ -53,45 +53,44 @@ mus = \context Voice { \relative f' { d e f g \bar ":|" } }
 }
 
 \new Staff \with {
-  \override StaffSymbol #'staff-space = #1.5
   \override StaffSymbol #'line-positions = #'(-2 0)
+  \override StaffSymbol #'staff-space = #1.5
 } {
   <<
     \mus
-    \context Voice { s1^"as wide as previous" }
+    \context Voice { s1^"widened by staff-space" }
   >>
 }
 
 \new Staff \with {
-  \override StaffSymbol #'line-positions = #'(-2.9 -2)
+  \override StaffSymbol #'line-positions = #'(-2 0)
 } {
   <<
     \mus
-    \context Voice { s1^"narrow staff" }
+    \context Voice { s1^"dots outside" }
   >>
 }
 
 \new Staff \with {
-  \override StaffSymbol #'line-positions = #'(-4 -3 -2)
+  \override StaffSymbol #'line-positions = #'(-2.9 -2)
 } {
   <<
     \mus
-    \context Voice { s1^"dense staff" }
+    \context Voice { s1^"narrow staff" }
   >>
 }
 
 \new Staff \with {
   \override StaffSymbol #'line-positions = #'(-4 -3 -2)
-  \override StaffSymbol #'staff-space = #0.8
 } {
   <<
     \mus
-    \context Voice { s1^"denser staff" }
+    \context Voice { s1^"dense staff" }
   >>
 }
 
 \new Staff \with {
-  \override StaffSymbol #'line-positions = #'(-6 -2 0 5)
+  \override StaffSymbol #'line-positions = #'(-6 -5 -2 0 3 5)
 } {
   <<
     \mus
@@ -109,6 +108,24 @@ mus = \context Voice { \relative f' { d e f g \bar ":|" } }
   >>
 }
 
+\new Staff \with {
+  \override StaffSymbol #'line-positions = #'(-10 -2 6 14)
+} {
+  <<
+    \mus
+    \context Voice { s1^"dots in outer spaces" }
+  >>
+}
+
+\new Staff \with {
+  \override StaffSymbol #'line-positions = #'(-5 -4 -2 2 4 6)
+} {
+  <<
+    \mus
+    \context Voice { s1^"dots in the middle" }
+  >>
+}
+
 \new Staff \with {
   \override StaffSymbol #'thickness = #4
 } {
diff --git a/input/regression/tablature-repeat.ly b/input/regression/tablature-repeat.ly
new file mode 100644 (file)
index 0000000..fc3d8a9
--- /dev/null
@@ -0,0 +1,15 @@
+\header
+{
+  texidoc = "How a repeat sign looks in tablature."
+}
+
+\version "2.17.2"
+\paper
+{
+  ragged-right = ##t
+}
+
+\new TabStaff
+{
+  \repeat volta 2 s1
+}