From b50658bea833eb7fd7650cbf5cd9a9bd0b6e1aca Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benk=C5=91=20P=C3=A1l?= Date: Thu, 19 Jul 2012 22:24:46 +0200 Subject: [PATCH] regression tests for nonstandard staves --- .../regression/repeat-sign-global-size-10.ly | 43 ++++++ .../regression/repeat-sign-global-size-30.ly | 46 ++++++ input/regression/repeat-sign-layout-size.ly | 43 ++++++ input/regression/repeat-sign.ly | 139 ++++++++++++++++++ input/regression/zero-staff-space.ly | 2 +- 5 files changed, 272 insertions(+), 1 deletion(-) create mode 100644 input/regression/repeat-sign-global-size-10.ly create mode 100644 input/regression/repeat-sign-global-size-30.ly create mode 100644 input/regression/repeat-sign-layout-size.ly create mode 100644 input/regression/repeat-sign.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 index 0000000000..97c5d92925 --- /dev/null +++ b/input/regression/repeat-sign-global-size-10.ly @@ -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 index 0000000000..e143d557a3 --- /dev/null +++ b/input/regression/repeat-sign-global-size-30.ly @@ -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 index 0000000000..56ff720a22 --- /dev/null +++ b/input/regression/repeat-sign-layout-size.ly @@ -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 index 0000000000..09ed993f2e --- /dev/null +++ b/input/regression/repeat-sign.ly @@ -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" } + >> +} diff --git a/input/regression/zero-staff-space.ly b/input/regression/zero-staff-space.ly index 62e2e16bc9..fc1c162c06 100644 --- a/input/regression/zero-staff-space.ly +++ b/input/regression/zero-staff-space.ly @@ -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 ":|" } } -- 2.39.2