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 "||" |
+} |