Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1116)

Unified Diff: input/regression/set-once-post.ly

Issue 581600043: Issue 5740: Add \post to defer context actions to end of time step
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | input/regression/set-post.ly » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: input/regression/set-once-post.ly
diff --git a/input/regression/set-once-post.ly b/input/regression/set-once-post.ly
new file mode 100644
index 0000000000000000000000000000000000000000..f09e01ae5a4af561cb4cd6bd37c7154e8282cf2a
--- /dev/null
+++ b/input/regression/set-once-post.ly
@@ -0,0 +1,42 @@
+\version "2.21.0"
+
+\header {
+
+ texidoc = "@code{\\post \\set} should change a context property
+value at the end of the timestep. This test covers interactions
+between @code{\\post} and @code{\\once}."
+
+}
+\fixed b' {
+ \set fingeringOrientations = #'(left)
+ <b-1>1
+ %% \post changes the value after \once reverts it
+ \once \set fingeringOrientations = #'(right)
+ \post \set fingeringOrientations = #'(up)
+ <b-1>-"right" |
+ <b-1>-"up" | \bar "||"
+
+ \set fingeringOrientations = #'(left)
+ <b-2> |
+ %% \post changes the value after \once reverts it
+ \post \set fingeringOrientations = #'(right)
+ \once \set fingeringOrientations = #'(up)
+ <b-2>-"up" |
+ <b-2>-"right" | \bar "||"
+
+ \set fingeringOrientations = #'(left)
+ <b-3> |
+ %% \post defers the change until the end of the current timestep.
+ %% \once prevents the change from carrying over to the next timestep.
+ %% The net effect is nothing.
+ \once \post \set fingeringOrientations = #'(up)
+ <b-3>-"left" |
+ <b-3>-"left" | \bar "||"
+
+ \set fingeringOrientations = #'(right)
+ <b-4> |
+ %% ditto the previous
+ \post \once \set fingeringOrientations = #'(up)
+ <b-4>-"right" |
+ <b-4>-"right" | \bar "||"
+}
« no previous file with comments | « no previous file | input/regression/set-post.ly » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b