]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/regression/quote-overrides.ly
Imported Upstream version 2.14.2
[lilypond.git] / input / regression / quote-overrides.ly
diff --git a/input/regression/quote-overrides.ly b/input/regression/quote-overrides.ly
new file mode 100644 (file)
index 0000000..043864e
--- /dev/null
@@ -0,0 +1,49 @@
+\version "2.14.0"
+
+\header {
+  texidoc = "The @code{\\quoteDuring} command shall also quote correctly all
+  @code{\\override}, @code{\\once \\override}, @code{\\revert}, @code{\\set},
+  @code{\\unset} and @code{\\tweak} events. The first line contains the
+  original music, the second line quotes the whole music and should look
+  identical.
+
+  By default, not all events are quoted. By setting the quoted event types to
+  @code{'(StreamEvent)}, everything should be quoted."
+}
+
+mus = \relative c' {
+  % Acciaccaturas contain a slur and  \override Stem #'stroke-style
+  % Thus, we're checking \override here
+  c4 \acciaccatura d8 c4
+  % Checking \set and \unset
+  \set fontSize = #6 f
+  \unset fontSize f |
+
+  \set autoBeaming = ##f
+  % Checking \once \override
+  \once \override Stem #'thickness = #8.0 d8
+  % Checking two overrides
+  \override Stem #'thickness = #8.0 \override Stem #'stroke-style = "grace"
+  d8
+  % reverting one of them
+  \revert Stem #'thickness d8
+  % and the other
+  \revert Stem #'stroke-style c8
+
+  % checking tweaks
+  c2-\tweak #'color #red ->
+}
+\addQuote "music" \mus
+
+\layout {
+  \context {
+    \Score
+    quotedEventTypes = #'(StreamEvent)
+  }
+}
+
+\score
+{ <<
+  \new Staff \mus
+  \new Voice { \quoteDuring #"music" s1*2 }
+>> }