Index: input/regression/context-find-current.ly |
diff --git a/input/regression/context-find-current.ly b/input/regression/context-find-current.ly |
new file mode 100644 |
index 0000000000000000000000000000000000000000..555bd43bb05b9c81036a39812175264cde1d0c4f |
--- /dev/null |
+++ b/input/regression/context-find-current.ly |
@@ -0,0 +1,27 @@ |
+\version "2.19.80" |
+ |
+\header { |
+ texidoc = "@code{\\context} finds the current context by type and ID |
+even when there are matching contexts both above and below. |
+@verbatim |
+ StaffGroup A |
+ \ |
+ StaffGroup A (from here, find StaffGroup A) |
+ \ |
+ StaffGroup A |
+@end verbatim |
+INNER and RESULT should appear in the left margin." |
+} |
+ |
+\new StaffGroup = "A" << |
+ \new StaffGroup = "A" \with { instrumentName = "SOUGHT" } << |
+ \new StaffGroup = "A" \with { instrumentName = "INNER" } << |
+ s1 |
+ >> |
+ \context StaffGroup = "A" << |
+ %% This name is expected to replace SOUGHT. |
+ \set StaffGroup.instrumentName = "RESULT" |
+ s1 |
+ >> |
+ >> |
+>> |