]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix 1477: Update regtests to suppress expected warnings
authorReinhold Kainhofer <reinhold@kainhofer.com>
Thu, 29 Sep 2011 09:27:02 +0000 (11:27 +0200)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Thu, 29 Sep 2011 09:27:02 +0000 (11:27 +0200)
If a file contains (ly:expect-warning ....), the corresponding warning
string will be added to a list of expected warnings. If the corresponding
warning (or erro) is triggered, it will not be printed to stderr, but the
string will be removed from the list. So, each ly:expect-warning, suppresses
exactly one occurrence of the warning. To suppress a warning multiple times,
call ly:expect-warning multiple times.

After one file is processed, the list of expected warnings is checked.
If it is not empty, it means that an expected warning was not triggered,
which might be a bug. So we print out a warning message about this fact.

This allows the regtests to check proper warning messages, without
polluting the console output with those warning messages.
All warnings that are actually printed in the regtests are a bug.

For translated error message, there are two approaches: If the warning
is created from scheme, simply use
           (ly:expect-warning (_ "msg with ~a") "args")
If the message is triggered from C++, the translated string is in printf
syntax, so we need to translate that and then convert it into a format
string for Scheme. This can be done with the new function
ly:translate-cpp-warning-scheme instead of _:
           (ly:expect-warning (ly:translate-cpp-warning-scheme "msg with %s") "args")

This patch also adapts all regtests that are supposed to print warnings
to this new approach. After this patch is applied, the only warnings/errors
that are printed out by a regtest run are warnings/errors that should
NOT be there (with the exception of warn-expected-warning-missing.ly and
safe.ly).

38 files changed:
input/regression/bar-number-check-warning.ly
input/regression/beam-quarter.ly
input/regression/bom-mark.ly
input/regression/clef-warn.ly
input/regression/glissando-no-break.ly
input/regression/harp-pedals-sanity-checks.ly
input/regression/harp-pedals.ly
input/regression/header-cyclic-reference.ly
input/regression/incompatible-stem-warning.ly
input/regression/instrument-switch-invalid-warning.ly
input/regression/invalid-engraver.ly
input/regression/loglevels.ly
input/regression/lyric-combine-empty-warning.ly
input/regression/markup-brace-warning.ly
input/regression/markup-cyclic-reference.ly
input/regression/markup-depth-non-terminating.ly
input/regression/markup-music-glyph.ly
input/regression/page-break-warn-forbidden.ly
input/regression/page-spacing-system-count-overfull.ly
input/regression/page-turn-page-breaking-badturns.ly
input/regression/paper-margins-consistency.ly
input/regression/paper-margins-overrun.ly
input/regression/phrasing-slur-multiple.ly
input/regression/repeat-unfold.ly
input/regression/repeat-volta.ly
input/regression/skiptypesetting-all-true.ly
input/regression/skiptypesetting-bar-check.ly
input/regression/slur-multiple-linebreak.ly
input/regression/slur-multiple.ly
input/regression/spacing-loose-grace-error.ly
input/regression/stem-tremolo.ly
input/regression/tablature-negative-fret.ly
input/regression/tablature-zero-finger.ly
input/regression/tie-arpeggio.ly
input/regression/tie-unterminated.ly
input/regression/warn-conflicting-key-signatures.ly
input/regression/warn-expected-warning-missing.ly [new file with mode: 0644]
input/regression/warn-unterminated-span-dynamic.ly

index a394dead0d7742a40fd4840791018ceb00239ebe..b9fa04868ff57e3641d13713c218c4b7d2c11563 100644 (file)
@@ -1,5 +1,6 @@
 \version "2.14.0"
 #(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (_ "Barcheck failed got ~a expect ~a") 3 15)
 
 \header {
 
index fb5c4359cfb01e73213d5780f3340d5709803b05..058570dd50aa533e7259042c0166a7a245547f8b 100644 (file)
@@ -1,6 +1,8 @@
 \version "2.14.0"
 
 #(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (_ "stem does not fit in beam"))
+#(ly:expect-warning (_ "beam was started here"))
 
 \header {
   texidoc= "Quarter notes may be beamed: the beam is halted momentarily."
index 854754bafb9b50af6232ada6967cd2d1705cd6da..bc82d0cc4a828e1ef9201159b16e729c25a3b8dd 100644 (file)
@@ -1,3 +1,4 @@
+#(ly:expect-warning (_ "stray UTF-8 BOM encountered"))
 #(ly:set-option 'warning-as-error #f)
  \version "2.15.9"
 
index 425f4a4fa5885aa4051fe8e9a45e36224400539e..986a6520f4ca4ba88ac64841dc2fd70a23296256 100644 (file)
@@ -1,6 +1,9 @@
 \version "2.14.0"
 
 #(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (_ "unknown clef type `~a'") "foo")
+% We don't need to match the whole list of clefs, the beginning will suffice
+#(ly:expect-warning (_ "supported clefs: ~a") "C F G G2")
 
 \header {
   texidoc = "Unknown clef name warning displays available clefs"
index 0ce1613e18ef175261747bcac33dceec9dc7bfe0..77994f7f54ea497ba287a22540ffe592398710da 100644 (file)
@@ -1,10 +1,14 @@
+\version "2.14.0"
+#(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (_ "forced break was overridden by some other event, should you be using bar checks?"))
+
 \header {
 
   texidoc = "Glissandi are not broken. Here a @code{\\break} is ineffective.
 Use @code{breakable} grob property to override."
 
 }
-\version "2.14.0"
+
 \layout {
   ragged-right = ##t
 }
index 63270dfb4ad0122782d2fcff14402bcd8c4d996e..363acfa17860a3025572c0b840321a1a76c5e0f0 100644 (file)
@@ -1,6 +1,11 @@
 \version "2.14.0"
 
 #(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (_ "Harp pedal diagram contains dividers at positions ~a.  Normally, there is only one divider after the third pedal.") '(1 3 5))
+#(ly:expect-warning (_ "Harp pedal diagram contains dividers at positions ~a.  Normally, there is only one divider after the third pedal.") '(4))
+#(ly:expect-warning (_ "Harp pedal diagram contains ~a pedals rather than the usual 7.") 5)
+#(ly:expect-warning (_ "Harp pedal diagram does not contain a divider (usually after third pedal)."))
+
 
 \header {
   texidoc = "The harp-pedal markup function does some sanity checks. All 
index e7e1c1c7d63b2df68226393c9b80dcb1c1772fbb..2b66e178da36a4707621fbef4faba1b262aae1fe 100644 (file)
@@ -1,6 +1,16 @@
 \version "2.14.0"
 
 #(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (_ "Harp pedal diagram contains ~a pedals rather than the usual 7.") 0)
+#(ly:expect-warning (_ "Harp pedal diagram does not contain a divider (usually after third pedal)."))
+#(ly:expect-warning (_ "Harp pedal diagram contains ~a pedals rather than the usual 7.") 1)
+#(ly:expect-warning (_ "Harp pedal diagram does not contain a divider (usually after third pedal)."))
+#(ly:expect-warning (_ "Unhandled entry in harp-pedal: ~a" ) "a")
+#(ly:expect-warning (_ "Unhandled entry in harp-pedal: ~a" ) "s")
+#(ly:expect-warning (_ "Unhandled entry in harp-pedal: ~a" ) "d")
+#(ly:expect-warning (_ "Unhandled entry in harp-pedal: ~a" ) "f")
+#(ly:expect-warning (_ "Unhandled entry in harp-pedal: ~a" ) "x")
+
 
 \header {
   texidoc = "Basic harp diagram functionality, including circled pedal boxes. 
index 03bd5c3f60bc47d2e264584bfa4fdbaff82595ea..7dcf6c57f249ae202236b6ed0d7140b0c7c794ad 100644 (file)
@@ -1,5 +1,7 @@
 \version "2.15.11"
 #(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (_ "Recursive definition of property ~a detected!") 'header:title)
+#(ly:expect-warning (_ "Recursive definition of property ~a detected!") 'header:composer)
 
 \header {
   texidoc = "Cyclic references in header fields should cause a warning, but
index 29631053fe76151f90d570321b4dec561aa4a98d..59bc93242df8db58cae0433e5f2b5b55a231f16b 100644 (file)
@@ -1,5 +1,22 @@
 \version "2.14.0"
 #(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (ly:translate-cpp-warning-scheme "adding note head to incompatible stem (type = %d/%d)") 1 1)
+#(ly:expect-warning (ly:translate-cpp-warning-scheme "maybe input should specify polyphonic voices"))
+#(ly:expect-warning (ly:translate-cpp-warning-scheme "adding note head to incompatible stem (type = %d/%d)") 1 8)
+#(ly:expect-warning (ly:translate-cpp-warning-scheme "maybe input should specify polyphonic voices"))
+#(ly:expect-warning (ly:translate-cpp-warning-scheme "adding note head to incompatible stem (type = %d/%d)") 4 1)
+#(ly:expect-warning (ly:translate-cpp-warning-scheme "maybe input should specify polyphonic voices"))
+#(ly:expect-warning (ly:translate-cpp-warning-scheme "adding note head to incompatible stem (type = %d/%d)") 1 1)
+#(ly:expect-warning (ly:translate-cpp-warning-scheme "maybe input should specify polyphonic voices"))
+#(ly:expect-warning (ly:translate-cpp-warning-scheme "adding note head to incompatible stem (type = %d/%d)") 1 4)
+#(ly:expect-warning (ly:translate-cpp-warning-scheme "maybe input should specify polyphonic voices"))
+#(ly:expect-warning (ly:translate-cpp-warning-scheme "adding note head to incompatible stem (type = %d/%d)") 1 1)
+#(ly:expect-warning (ly:translate-cpp-warning-scheme "maybe input should specify polyphonic voices"))
+#(ly:expect-warning (ly:translate-cpp-warning-scheme "adding note head to incompatible stem (type = %d/%d)") 1 4)
+#(ly:expect-warning (ly:translate-cpp-warning-scheme "maybe input should specify polyphonic voices"))
+#(ly:expect-warning (ly:translate-cpp-warning-scheme "adding note head to incompatible stem (type = %d/%d)") 1 8)
+#(ly:expect-warning (ly:translate-cpp-warning-scheme "maybe input should specify polyphonic voices"))
+
 
 \header {
 
index 038dbcb2aa5367f32f8c6d4d6d13916c8b4fc631..c0ad386d150acf6e4bef036fdf5607b66fe1c391 100644 (file)
@@ -1,5 +1,6 @@
 \version "2.14.0"
 #(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (_ "No such instrument: ~a") "bassClar")
 
 \header {
   texidoc = "The @code{switchInstrument} music function prints a warning if
index 347c76471f576662e2a87d77b14f26c10722bd3e..0e738f028a15e25aabc4760c994b5c71de3dbcaf 100644 (file)
@@ -1,6 +1,8 @@
 \version "2.14.0"
 
 #(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (ly:translate-cpp-warning-scheme "unknown translator: `%s'") "Rhythmic_column_engraver_foo")
+#(ly:expect-warning (ly:translate-cpp-warning-scheme "cannot find: `%s'") "Rhythmic_column_engraver_foo")
 
 \header {
   texidoc = "Engravers which do not exist produce a warning."
index 880c6375e0d0dd9d4b71d1e642cad7723a6aa2f9..705ed3299d974e101b7ef843cecb9184bbc3afa5 100644 (file)
@@ -1,6 +1,8 @@
 \version "2.15.9"
 
 #(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (_ "Test warning\n"))
+#(ly:expect-warning (_ "already have slur"))
 
 \header{
   texidoc="
index 59c68ca4253bb08734197bfb850a96198bec15d7..ea797526dc84684efa670b7c587076e5dd381b8a 100644 (file)
@@ -1,5 +1,8 @@
 \version "2.15.5"
 
+#(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (ly:translate-cpp-warning-scheme "cannot find Voice `%s'") "not-existing-notes")
+
 \header {
 
   texidoc = "If lyrics are assigned to a non-existing voice, a warning should
@@ -8,7 +11,6 @@ no warning should be printed."
 
 }
 
-#(ly:set-option 'warning-as-error #f)
 <<
   \new Staff
     \new Voice = "notes" {
index 904a70a36b8948c76262eb4f0718a193770540b3..6a7f4c9fc0d929fe8b9d559809143c5ad4910192 100644 (file)
@@ -1,6 +1,8 @@
 \version "2.14.0"
 
 #(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (_ "no brace found for point size ~S ") 10)
+#(ly:expect-warning (_ "defaulting to ~S pt") 10.5)
 
 \header {
   texidoc = "If  @code{\\left-brace} or @code{\\right-brace} cannot
index f4495db1ce40c8a42a59b060010f51b3bcebeb43..66f69b42247695103795d43a1485a9f9a4947379 100644 (file)
@@ -1,5 +1,7 @@
 \version "2.15.11"
 #(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (ly:translate-cpp-warning-scheme "Cyclic markup detected: %s") 'cycle-markup)
+#(ly:expect-warning (ly:translate-cpp-warning-scheme "Cyclic markup detected: %s") 'cycleI-markup)
 
 \header {
   texidoc = "Cyclic markup definitions should cause a warning, but
index 52e0f70ee02aa78a80614c3f8d7a6b73628be09b..3d9e00f5f4b73a2d3e67cf720dbf6e8cc3e342a8 100644 (file)
@@ -1,5 +1,6 @@
 \version "2.15.12"
 #(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (ly:translate-cpp-warning-scheme "Markup depth exceeds maximal value of %d; Markup: %s") 1024 "recursive-explosion-markup")
 
 \header {
   texidoc = "Markups have a maximum depth to prevent non-termination."
index 4aec56f9eefd7f5071decb8792f6b7d348475186..57822eaaba3015fa73002e432b8c5f5d0b1e3116 100644 (file)
@@ -1,6 +1,7 @@
 \version "2.14.0"
 
 #(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (_ "Cannot find glyph ~a") "UNKNOWN-GLYPH")
 
 \header {
   texidoc = "Reset fontname for musicglyph.
index 224f572902e09a840d1847534f1611bddcae7854..15c9a3965d63e102280951fa34ea01d086530a93 100644 (file)
@@ -1,3 +1,8 @@
+\version "2.14.0"
+
+#(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (_ "forced break was overridden by some other event, should you be using bar checks?"))
+#(ly:expect-warning (_ "forced break was overridden by some other event, should you be using bar checks?"))
 
 \header {
 
@@ -6,8 +11,6 @@
 
 }
 
-\version "2.14.0"
-
 \new Staff {
    c'1 \glissando
    \pageBreak
index e92203621ef520df01ae28ec985acc86d96f2b7e..627d2b52dfbc210f5748fab90eccdb9976864a47 100644 (file)
@@ -1,4 +1,6 @@
 \version "2.14.0"
+#(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (_ "cannot find line breaking that satisfies constraints"))
 
 \header {
   texidoc = "Page breaking doesn't crash when the line-breaking
index 44a21bc85fded47e758d9db8480244c7721a6f35..c22f0fefb7c13ac2521172107f5c504b7dc05145 100644 (file)
@@ -1,4 +1,6 @@
 \version "2.14.0"
+#(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (_ "cannot fit the first page turn onto a single page.  Consider setting first-page-number to an even number."))
 
 \header {
     texidoc="If there are no good places to have a page turn,
index af1a82aacc9af89383e5921a0181ed66fbbd3711..d0cca0e3a77d72d04b7e6b89bb9c2d8f1fe9c7fd 100644 (file)
@@ -1,6 +1,7 @@
 \version "2.14.0"
 
 #(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (_ "margins do not fit with line-width, setting default values"))
 
 \header {
   texidoc = "Margin values must fit the line-width, that means: paper-width =
index 85f34dc0c1a54ca1123ec6dd2b3d470057438b81..2640928125e28bb26bc2d9a977c863d56af36a41 100644 (file)
@@ -1,6 +1,7 @@
 \version "2.14.0"
 
 #(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (_ "systems run off the page due to improper paper settings, setting default values"))
 
 \header {
   texidoc = "Normally, margin settings must not cause systems to run off the page."
index 203a6eceeed786335e099ba1c04c27c366185a44..f9ccca61b257ba55a54807c46ee8bc026b71ad9b 100644 (file)
@@ -1,6 +1,8 @@
 \version "2.15.4"
 
 #(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (_ "already have phrasing slur"))
+#(ly:expect-warning (_ "cannot end phrasing slur"))
 
 \header {
   texidoc = "LilyPond does not support multiple concurrent phrasing slurs with the 
index 9b1578266db459c2b1ce005dd21efaf4ac539427..763020cd3c64b38d3635d96f5d4295bd7267756d 100644 (file)
@@ -1,5 +1,8 @@
 \version "2.14.0"
 
+#(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (_ "More alternatives than repeats.  Junking excess alternatives"))
+
 \header{
   texidoc="LilyPond has two modes for repeats: unfolded and semi-unfolded. 
 Unfolded repeats are fully written out.  Semi unfolded repeats have the body
@@ -11,8 +14,6 @@ get to the number of repeats.
 Unfolded behavior:"
 }
 
-#(ly:set-option 'warning-as-error #f)
-
 \context Voice \relative c'' {
   \repeat unfold 3 { c^"3x 0a" d }
   %% less alts than body
index d1c26e76c34fb2a04aafe61a6b157bb7fe6cb088..693c27c8708e12584d707c114ac688e8e9d1ef7b 100644 (file)
@@ -1,5 +1,6 @@
 \version "2.14.0"
 #(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (_ "More alternatives than repeats.  Junking excess alternatives"))
 
 \header{
   texidoc="
index 076548084e44bbf8ebee8ff339fcdbd137baf526..61df8ad13cb011ae7b39085239f06026219146eb 100644 (file)
@@ -1,4 +1,12 @@
 \version "2.14.0"
+#(ly:expect-warning (_ "didn't find a vertical alignment in this system"))
+#(ly:expect-warning (_ "didn't find a vertical alignment in this system"))
+#(ly:expect-warning (_ "didn't find a vertical alignment in this system"))
+#(ly:expect-warning (_ "didn't find a vertical alignment in this system"))
+#(ly:expect-warning (_ "didn't find a vertical alignment in this system"))
+#(ly:expect-warning (_ "didn't find a vertical alignment in this system"))
+#(ly:expect-warning (_ "system with empty extent"))
+#(ly:expect-warning (_ "didn't find a vertical alignment in this system"))
 
 \header{
   texidoc = "
index ce0daec988f7630176f83bd5baa299861d3d12a9..1635a73388819112d3cda5ebd49dbbcd66069c05 100644 (file)
@@ -1,5 +1,6 @@
 \version "2.14.0"
 #(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (ly:translate-cpp-warning-scheme "barcheck failed at: %s") "3/4")
 
 \header {
 
index 763f6239223df908277abfb67701d191aeeeca62..05d76aa582d93e6a1c34e3dc86f6618cc867745b 100644 (file)
@@ -1,6 +1,7 @@
 \version "2.15.5"
 
 #(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (_ "already have slur"))
 
 \header {
   texidoc = "An additional opening slur during a running slur should be ignored
index 21cb4440717165706ee91b35c3a370d4c0705f1c..f73d93a3166d29ce4c2afb5da56b300c57b542f3 100644 (file)
@@ -1,6 +1,8 @@
 \version "2.15.5"
 
 #(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (_ "already have slur"))
+#(ly:expect-warning (_ "cannot end slur"))
 
 \header {
   texidoc = "LilyPond does not support multiple concurrent slurs with the 
index cd647bcd82f9226b454ab654cc845a4aa9eaf8f3..4deda340a572481c97b18338ad2f3c2855f6e21b 100644 (file)
@@ -1,5 +1,10 @@
-\header
-{
+\version "2.14.0"
+
+#(ly:expect-warning (_ "Cannot determine neighbors for floating column. "))
+#(ly:expect-warning (_ "Loose column does not have right side to attach to."))
+#(ly:expect-warning (_ "Loose column does not have right side to attach to."))
+
+\header {
 
 texidoc = "Even in case of incorrect contexts (eg. shortlived
   contexts) that break linking of columns through spacing wishes,
@@ -11,8 +16,6 @@ texidoc = "Even in case of incorrect contexts (eg. shortlived
 
 }
 
-\version "2.14.0"
-
 %% \new Staff cause shortlived, disconnected Voice contexts
 %% breaking spacing-wishes links.
 \score {
index 8c0ef57d7924cd8d227939317f0a3934e6f20360..ac7e155fbff1448080825efa408edbb9ba56effa 100644 (file)
@@ -1,5 +1,9 @@
-
 \version "2.14.0"
+
+#(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (_ "tremolo duration is too long"))
+#(ly:expect-warning (_ "tremolo duration is too long"))
+
 \header{
   texidoc="
 Stem tremolos or rolls are tremolo signs that look like beam segments
@@ -12,16 +16,19 @@ and tilted extra if the stem is down.
 The tremolos should be positioned a fixed distance from the end of the
 stems unless there is no stem, in which case they should be positioned
 a fixed distance from the note head.
+
+If an impossible tremolo duration (e.g. :4) is given, a warning is
+printed.
 "
 }
 
-#(ly:set-option 'warning-as-error #f)
-
 \context Voice \relative c''{
   \textSpannerUp
   \override TextScript  #'padding = #5
+  % The following note should print a warning (quarter tremolo cannot be notated)
   a1:4^":4" a:8^":8" c:16^":16" a:32^":32" a^"x" a:^":"
   a':32 a,,:32
+  % The following note should print a warning (quarter tremolo cannot be notated)
   a'4:4 c:8 a:16 c:32 a a: a2:
   \break
   \stemUp
index 0010438d2620417650e9a62e405ad2f26b659790..641b6b0b429dbcdd7bc192b203198a42e0254c17 100644 (file)
@@ -1,5 +1,14 @@
 \version "2.14.0"
 #(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (_ "Requested string for pitch requires negative fret: string ~a pitch ~a") 1 "#<Pitch c' >")
+#(ly:expect-warning (_ "Ignoring string request and recalculating."))
+#(ly:expect-warning (_ "Negative fret for pitch ~a on string ~a") "#<Pitch c' >" 1)
+#(ly:expect-warning (_ "Requested string for pitch requires negative fret: string ~a pitch ~a") 1 "#<Pitch c' >")
+#(ly:expect-warning (_ "Ignoring note in tablature."))
+
+
+
+% #(ly:expect-warning (ly:translate-cpp-warning-scheme "Markup depth exceeds maximal value of %d; Markup: %s") 1024 "recursive-explosion-markup")
 
 \header {
 
index 60c0113dc653915efa3abf3aaa3e820b95a44870..53ee9e3050581d11e078196d7d89567518e6f80e 100644 (file)
@@ -1,5 +1,6 @@
 \version "2.14.0"
 #(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (_ "No open string for pitch ~a") "#<Pitch f >")
 
 \header {
   texidoc="
index 99ff64c71427d551ec3b9770a4701493e1a2072a..28d3e303d174c00daca2c414db4212ca1c6c5d56 100644 (file)
@@ -1,5 +1,7 @@
 \version "2.14.0"
 #(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (_ "unterminated tie"))
+#(ly:expect-warning (_ "unterminated tie"))
 
 \header
 {
index 26b5559d8a515b6350266e36bc2478bd86424a54..071a7df745283969c8b62e24836a35e2967f2244 100644 (file)
@@ -1,5 +1,6 @@
 \version "2.14.0"
 #(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (_ "unterminated tie"))
 
 \header {
   texidoc = "When a tie is followed only by unmatching notes and the tie cannot
index 0845cc5f60bcabbaf7a7911711aaca8c4e3bfeb3..7b860a7bf26397413030e4bfcfc7e8d8ba3f1df2 100644 (file)
@@ -1,5 +1,7 @@
 \version "2.14.0"
 #(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (ly:translate-cpp-warning-scheme "Two simultaneous %s events, junking this one") "key-change")
+#(ly:expect-warning (ly:translate-cpp-warning-scheme "Previous %s event here") "key-change")
 
 \header {
   texidoc = "If you specify two different key signatures at one point, a
diff --git a/input/regression/warn-expected-warning-missing.ly b/input/regression/warn-expected-warning-missing.ly
new file mode 100644 (file)
index 0000000..27ec6c7
--- /dev/null
@@ -0,0 +1,12 @@
+\version "2.15.13"
+
+#(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (_ "this is a warning that won't be triggered"))
+
+\header {
+  texidoc = "If a warning is expected, but not triggered, print out a
+warning about this fact. This will be used to detect missing warnings
+in our regtests."
+}
+
+\relative c' { c4 }
index fd53599ffbcc6c2eebabf23395b6015c088027c4..c6dd64847c8063553bf484258aa68421ff7dc0ed 100644 (file)
@@ -1,6 +1,8 @@
 \version "2.14.0"
 
 #(ly:set-option 'warning-as-error #f)
+#(ly:expect-warning (ly:translate-cpp-warning-scheme "unterminated %s") "crescendo")
+#(ly:expect-warning (ly:translate-cpp-warning-scheme "unterminated %s") "decrescendo")
 
 \header {
   texidoc = "A warning is printed if a dynamic spanner is