%% Generated by lilypond-book
%% Options: [exampleindent=10.16\mm,indent=0\mm,line-width=160\mm,paper-height=845.047\pt,paper-width=597.508\pt,papersize='(cons (* 597.508 pt) (* 845.047 pt))]
\include "lilypond-book-preamble.ly"


% ****************************************************************
% Start cut-&-pastable-section
% ****************************************************************

#(ly:set-option 'eps-box-padding 3.000000)



\paper {
  #(set-paper-size '(cons (* 597.508 pt) (* 845.047 pt)))
  indent = 0\mm
  line-width = 160\mm
  % offset the left padding, also add 1mm as lilypond creates cropped
  % images with a little space on the right
  line-width = #(- line-width (* mm  3.000000) (* mm 1))
}

\layout {
  
}




% ****************************************************************
% ly snippet:
% ****************************************************************
\sourcefilename "/lilypond-2.27.2/input/regression/premeasure-initial-context.ly"
\sourcefileline 0
\version "2.27.2"

\header {
  texidoc = "This test checks that @code{\\premeasure} does not interfere with
creating the contexts specified by its argument.

The output should have exactly two staves, labeled ``A'' and
``B''.  The one labeled ``A'' should show the@tie{}A above middle@tie{}C.  The
other should show the@tie{}B above middle@tie{}C."
}

#(ly:set-option 'warning-as-error #t)

\layout {
  %% Move Timing to Staff to expose if \premeasure issues a timing-related
  %% event in Score before descending to \context Staff.
  \enablePerStaffTiming
}

%% Use a pitch transformation to expose if \premeasure uses its argument
%% more than once by reference.
\fixed c' <<
  %% Wrapping the argument in sequential music should make no difference.
  %% Either way, \premeasure should not interfere with creating the specified
  %% context.
  {
    \premeasure \context Staff = "A" \with { instrumentName = "A" } a2
    \contextPropertyCheck Timing.measureLength 1
    1 |
  }
  {
    \premeasure { \context Staff = "B" \with { instrumentName = "B" } b2 }
    \contextPropertyCheck Timing.measureLength 1
    1 |
  }
>>



% ****************************************************************
% end ly snippet
% ****************************************************************
