%% Generated by lilypond-book
%% Options: [exampleindent=10.16\mm,indent=0\mm,line-width=160\mm]
\include "lilypond-book-preamble.ly"


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



\paper {
  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 "/home/gub/NewGub/gub/target/linux-x86/src/lilypond-git.sv.gnu.org--lilypond.git-stable-2.22/input/regression/lyric-combine-empty-warning.ly"
\sourcefileline 0
\version "2.19.2"

#(ly:set-option 'warning-as-error #t)
#(ly:expect-warning (ly:translate-cpp-warning-scheme "cannot find context: %s") "Voice = not-existing-notes")

\header {

  texidoc = "If lyrics are assigned to a non-existing voice, a warning should
be printed.  However, if the lyrics context does not contain any lyrics, then
no warning should be printed."

}

<<
  \new Staff
    \new Voice = "notes" {
      c1
    }
  % This should not give a warning (empty lyrics, existing voice):
  \new Lyrics \lyricsto "notes" { }
  % This should give a warning (non-existing voice):
  \new Lyrics \lyricsto "not-existing-notes" { Test }
  % This should NOT give a warning (non-existing voice, but also no lyrics):
  \new Lyrics \lyricsto "not-existing-notes" { }
>>



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