]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/regression/unpure-pure-container.ly
Imported Upstream version 2.16.0
[lilypond.git] / input / regression / unpure-pure-container.ly
diff --git a/input/regression/unpure-pure-container.ly b/input/regression/unpure-pure-container.ly
new file mode 100644 (file)
index 0000000..b60479d
--- /dev/null
@@ -0,0 +1,25 @@
+
+\version "2.16.0"
+
+\header {
+  texidoc = "unpure-pure containers take two arguments: an unpure property and
+a pure property.  The pure property is evaluated (and cached) for all
+pure calculations, and the unpure is evaluated for all unpure calculations.
+In this regtest, there are three groups of two eighth notes.  In the first
+group, the second note should move to accommodate the flag, whereas it should
+not in the second group because it registers the flag as being higher. The
+flag, however, remains at the Y-offset dictated by ly:flag::calc-y-offset.
+In the third set of two 8th notes, the flag should be pushed up to a Y-offset
+of 8.
+"
+}
+
+\relative c'' {
+  \stemUp \autoBeamOff
+  d,8 eis'
+  \once \override Flag #'Y-offset =
+    #(ly:make-unpure-pure-container ly:flag::calc-y-offset 8)
+  d,8 eis'!
+  \once \override Flag #'Y-offset = #8
+  d,8 eis'!
+}